<table><tr><td style="">TallFurryMan created this revision.<br />TallFurryMan added a reviewer: mutlaqja.<br />Herald added a project: KDE Edu.<br />Herald added a subscriber: kde-edu.<br />TallFurryMan requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27008">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This diff picks where the UI tests were left a few years ago.<br />
The implementation is reworked to pass the tests that were then implemented.</p>

<p>The idea is to execute the KStars application, and run all tests asynchronously<br />
from a QTimer::singleShot call. From there, some actions trigger modal dialogs,<br />
which block the click handler used by the test, and require a second layer of<br />
QTimer::singleShot. Some other dialogs are KSMessageBox widgets, which don't<br />
block the clieck handler, so test methods may vary uncomfortably.</p>

<p>Because QTest uses macros that simply "return;" with no code when they assess<br />
failure, it is difficult to call functions to run sub-tests used by other tests<br />
that may fail. Instead, macros are used to factor common functionalities in (we<br />
don't care for code size here).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Build and run "kstars_ui_tests".<br />
There are 7 passing tests, one of which produces an expected warning.<br />
Ekos profile is tested by creating a simple telescope/CCD simulator profile,<br />
saving it, editing it and verifying its contents, and deleting and verifying<br />
it is not present anymore. Nothing new, but works on current trunk.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R321 KStars</div></div></div><br /><div><strong>BRANCH</strong><div><div>improve__ui_tests (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27008">https://phabricator.kde.org/D27008</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>Tests/kstars_ui/CMakeLists.txt<br />
Tests/kstars_ui/kstars_ui_tests.cpp<br />
Tests/kstars_ui/kstars_ui_tests.h<br />
Tests/kstars_ui/test_ekos.cpp</div></div></div><br /><div><strong>To: </strong>TallFurryMan, mutlaqja<br /><strong>Cc: </strong>kde-edu, narvaez, apol<br /></div>