Reduce X11 environment sensitivity in ParaView GUI tests
ParaView's UI tests are quite sensitive to environmental settings such as default font choice, size, theme selection, etc. Potential solutions:
Force a theme
We could force a specific theme in Qt for our tests (we would need to decide what this is) by some mechanism. Preferably in the XML of the test itself so that it is explicit.
Tasks
- Select a theme per platform
- Bail in the test if it can't be loaded or selected
Pros
- One-stop-shop fix
Cons
- Test recording should be done with this theme which might mean a restart of ParaView is needed
- This theme might differ from platform to platform even so
Reduce environmental sensitivity
This is my preferred solution, but is a longer road. Basically, we remove any pixel information during recording of events or the like (except for viewport coordinates since that is under way more control already) and instead rely on other way of accessing information. The biggest culprit right now is pqPipelineBrowser
, though there are probably others.
Tasks
- Fix
pqPipelineBrowser
's recording mechanisms to handleQModelIndex
-based recording. This likely means makingpqFlatTreeView
inherit fromQAbstractItemView
which requires some more APIs to be implemented. - Re-record tests to use the new recording format
Pros
- Robust against Qt/GTK theme changes
- Still platform-independent
- Tests recorded on one platform should work everywhere automatically
Cons
- Implementing
QAbstractItemView
doesn't seem trivial (need Qt experience at least) - Tests need re-recorded
Cc: @utkarsh.ayachit