Skip to content

feat(test): Add helper methods for GUI test library

Description

These changes add helper methods to ease the creation of GUI tests. Some helpers, such as helper::Button or helper::Field, operates at the component level, while some others, such as helper::VideoControls, operates at the level of a Sight XML config.

Most helper methods use a Select helper class to get the components they operate on. For example, one can use Select::fromDialog("fileNameEdit") to get the component named "fileNameEdit" inside the currently displayed dialog window. Select has an implicit constructor which take a string, which will select a component within the main window, which is the most common use case. In addition, Select has two setters, withTimeout and withCondition which allows to set, respectively, a specific timeout to wait for the component to show up, and a condition for it to meet.

A new GUI test was added for SightCalibrator, which is VideoControls. It checks whether SightCalibrator's video controls work correctly (and, incidentally, check that helper::VideoControls works).

Closes #1011 (closed)

How to test it?

Run the new version of the GUI tests, they should all still work.

Merge request reports