Rework of UI tests, KStars window and Ekos profile.

Authored by TallFurryMan on Feb 16 2020, 7:46 AM.

Description

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

Details

Committed
mutlaqjaFeb 16 2020, 8:40 AM
Reviewer
KStars
Differential Revision
D27008: Rework of UI tests, KStars window and Ekos profile.
Parents
R321:0de397cefd26: 3.4.0 change log
Branches
Unknown
Tags
Unknown