Hi,
I am writing functional tests for my product, in which I have to click through bars of of bar chart (component: 'ojChart', type: 'bar'). When page loads bar chart has the graphic, where bars emerge from the bottom.
There bars becomes clickable when these bars are fully loaded. At this point I am unable to write proper functional tests as the handles to know when the graph is fully loaded is not working fine.
Scenario 1: Using whenReady attribute
I have used whenReady in the calculateSeries callback method to set CSS attribute which I will be looking up before firing a click event on each bar, but issue is event after setting this CSS attribute bar is not ready to consume click event.
$('#bla').ojChart('whenReady').then(function() {
// Set CSS
self.loaded(GRAPH_LOADED);
});
Scenario 2: Setting animationOnDataChange, animationOnDisplay to none
I have tried setting animationOnDataChange and animationOnDisplay attributes to none in selenium code before firing a click event. But this resulted in a distorted graph (i.e There were extra bars displayed than required).
ojChart('option','animationOnDataChange', 'none')";
ojChart('option','animationOnDisplay', 'none')";
Please suggest how can this be handled?
Thanks in advance.
- Jagannadh