Bug 500770 - swtbot: There is no condition to wait for an XY chart to be ready
Summary: swtbot: There is no condition to wait for an XY chart to be ready
Status: NEW
Alias: None
Product: Tracecompass
Classification: Tools
Component: TMF (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-02 13:35 EDT by Genevieve Bastien CLA
Modified: 2016-09-02 13:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Genevieve Bastien CLA 2016-09-02 13:35:50 EDT
The use case is to do swt bot tests of XY chart viewers. The test would like to wait for the refresh to be completed. For the time graph views, there is the ConditionHelpers.timeGraphIsReadyCondition() helper.

I don't know how it would be possible to have one such helper for XY chart viewer. One problem is that the swtbot is about a view, but the viewer is not a view. We need to have insight to the contents of the view to get the viewer. Would we need to add a fDirty field for the viewer?

Also, the view I'm thinking about is the CPU Usage view for instance. And if we want to wait for the XY chart to be ready, we probably also want to wait for the tree viewer on the left. So I think we would actually want a helper condition for any view that is not a time graph view, to make sure all its viewers are ready.

Any thoughts?
Comment 1 Marc-André Laperle CLA 2016-09-02 13:43:41 EDT
There is ConditionHelpers.numberOfSeries which is better than nothing but it could fail if you had the same number in the view before (most of the time it's empty at the start of a test though!). I think the next step would be to check if the data points that we need are there (not all of them!). Having a dirty flag has proven to be difficult in the case of the time graph. Perhaps it would be easier for XY charts.