Community
Participate
Working Groups
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?
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.