diff --git a/test/test_resolution_smoke_test.py b/test/test_resolution_smoke_test.py index 03f108bc5a5312ff9f369b42426ba00612eaf162..f69daefe5fc4b7876aa92b0e66b58fd1decd9354 100644 --- a/test/test_resolution_smoke_test.py +++ b/test/test_resolution_smoke_test.py @@ -74,18 +74,26 @@ class TestModulesAcrossResolutions(unittest.TestCase): the results. We should get the same result across different resolutions. - NOTE: This test needs to be updated when a new module is added, or when - one is deleted. It will fail until it is updated. + Modules added to SOI must be the same every time the program is ran. + + NOTE: This test needs to be updated when a new module is added, + deleted, or changed. It will fail until it is updated. """ expected_result = [ {"x": 0, "y": 0, "page": 1, "name": "AuthenticationBoardModule"}, {"x": 407.5, "y": 0, "page": 1, "name": "SubtractorcodesModule"}, - {"x": 633.0, "y": 0, "page": 1, "name": "FreeTextModule"}, - {"x": 733.0, "y": 0, "page": 1, "name": "TableModule"}, + {"x": 602.0, "y": 0, "page": 1, "name": "FreeTextModule"}, + {"x": 702.0, "y": 0, "page": 1, "name": "TableModule"}, ] def press_enter(): active_widget = app.activeModalWidget() + # triple click to select existing text for overwrite + QTest.mouseDClick(active_widget.edit_headline, Qt.LeftButton) + QTest.mouseClick(active_widget.edit_headline, Qt.LeftButton) + # need to overwrite text because title otherwise contains + # unpredictable text + QTest.keyClicks(active_widget.edit_headline, "TestTitle") QTest.keyClick(active_widget, Qt.Key_Enter) soi = SOI()