Rework of UI tests, KStars window and Ekos profile.
Summary:
This diff picks where the UI tests were left a few years ago.
The implementation is reworked to pass the tests that were then implemented.
The idea is to execute the KStars application, and run all tests asynchronously
from a QTimer::singleShot call. From there, some actions trigger modal dialogs,
which block the click handler used by the test, and require a second layer of
QTimer::singleShot. Some other dialogs are KSMessageBox widgets, which don't
block the clieck handler, so test methods may vary uncomfortably.
Because QTest uses macros that simply "return;" with no code when they assess
failure, it is difficult to call functions to run sub-tests used by other tests
that may fail. Instead, macros are used to factor common functionalities in (we
don't care for code size here).
Test Plan:
Build and run "kstars_ui_tests".
There are 7 passing tests, one of which produces an expected warning.
Ekos profile is tested by creating a simple telescope/CCD simulator profile,
saving it, editing it and verifying its contents, and deleting and verifying
it is not present anymore. Nothing new, but works on current trunk.
Reviewers: mutlaqja, KStars
Reviewed By: mutlaqja, KStars
Subscribers: kde-edu
Tags: KDE Edu
Differential Revision: https://phabricator.kde.org/D27008