From 0447be61512536b7125db6959c7faea91ed35f09 Mon Sep 17 00:00:00 2001 From: thomahl <thomahl@stud.ntnu.no> Date: Thu, 2 Apr 2020 15:30:19 +0200 Subject: [PATCH] =?UTF-8?q?#86=20kj=C3=B8rer=20processEvents=20=20etter=20?= =?UTF-8?q?.show=20i=20add=5Frow=20og=20remove=5Frow=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dette skal fikse en feil diskutert her: https://gitlab.stud.idi.ntnu.no/bachelor-paa-bittet/soitool/-/merge_requests/50#note_202722 Fiksen ble utviklet direkte inni GitLab Runner maskinen vår, og fungerer der --- test/test_module_authentication_board.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_module_authentication_board.py b/test/test_module_authentication_board.py index 3178351..5b3262e 100644 --- a/test/test_module_authentication_board.py +++ b/test/test_module_authentication_board.py @@ -83,6 +83,11 @@ class TestDefaultAuthenticationBoardModule(unittest.TestCase): self.module.show() QTest.qWaitForWindowExposed(self.module) + # From experience it can happen that the widget is not fully + # initialized before the QTest.keyClicks below. By calling + # processEvents here we give Qt the opportunity to catch up with us + app.processEvents() + old_row_count = self.module.rowCount() # Use shortcut 'Ctrl + +' @@ -111,6 +116,11 @@ class TestDefaultAuthenticationBoardModule(unittest.TestCase): self.module.show() QTest.qWaitForWindowExposed(self.module) + # From experience it can happen that the widget is not fully + # initialized before the QTest.keyClicks below. By calling + # processEvents here we give Qt the opportunity to catch up with us + app.processEvents() + old_row_count = self.module.rowCount() # First row is selected on startup, it contains headline -- GitLab