From 945f0462f8729079d92b4abf8a31b02a511d70d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 2 May 2024 23:42:28 +0200 Subject: [PATCH] SquishTests: Wait until exactly one proposal is being shown ...so we don't accidentally use a wrong one. Change-Id: I4c08e11aab34b8649f40ba14385492b17e656385 Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_designer_autocomplete/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_tools/tst_designer_autocomplete/test.py b/tests/system/suite_tools/tst_designer_autocomplete/test.py index 32db7647a83..1576e26e717 100644 --- a/tests/system/suite_tools/tst_designer_autocomplete/test.py +++ b/tests/system/suite_tools/tst_designer_autocomplete/test.py @@ -77,9 +77,12 @@ def main(): snooze(1) if test.verify(waitFor(proposalExists, 4000), "Verify that GenericProposalWidget is being shown."): + singleProposal = lambda: (object.exists(':popupFrame_Proposal_QListView') + and findObject(':popupFrame_Proposal_QListView').model().rowCount() == 1) + waitFor(singleProposal, 4000) type(proposalListView, "") lineCorrect = lambda: str(lineUnderCursor(editor)).strip() == "ui->%s" % buttonName - test.verify(waitFor(lineCorrect, 1000), + test.verify(waitFor(lineCorrect, 4000), ('Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), "ui->%s" % buttonName))) type(editor, "") # Delete line