D27008: Rework of UI tests, KStars window and Ekos profile.
Eric Dejouhanet
noreply at phabricator.kde.org
Wed Jan 29 20:48:22 GMT 2020
TallFurryMan created this revision.
TallFurryMan added a reviewer: mutlaqja.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
TallFurryMan requested review of this revision.
REVISION 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.
REPOSITORY
R321 KStars
BRANCH
improve__ui_tests (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D27008
AFFECTED FILES
Tests/kstars_ui/CMakeLists.txt
Tests/kstars_ui/kstars_ui_tests.cpp
Tests/kstars_ui/kstars_ui_tests.h
Tests/kstars_ui/test_ekos.cpp
To: TallFurryMan, mutlaqja
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20200129/da419fdf/attachment.html>
More information about the kde-edu
mailing list