From ee97ea03598e64206090c4cc78d12c2f32b517b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Mon, 24 Mar 2025 23:22:55 +0100 Subject: [PATCH] SquishTests: If expected proposal widget is not shown, try once more tst_memberoperator has some timing issue which we could not solve yet. This seems to happen only because Squish is typing way faster than any human user. Instead of slowing everything down unconditionally, this tries one more time only when the proposal widget was expected but not found. Change-Id: Ibd6bb012091f9120744f23245dea39defcd9cf96 Reviewed-by: Christian Stenger --- tests/system/suite_editors/tst_memberoperator/test.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_editors/tst_memberoperator/test.py b/tests/system/suite_editors/tst_memberoperator/test.py index 4d11465b719..5d673011bbe 100644 --- a/tests/system/suite_editors/tst_memberoperator/test.py +++ b/tests/system/suite_editors/tst_memberoperator/test.py @@ -62,12 +62,20 @@ def main(): "consider raising the timeout.") else: snooze(1) - type(cppwindow, testData.field(record, "operator")) + operator = testData.field(record, "operator") + type(cppwindow, operator) genericProposalWidget = __getGenericProposalListView__(1500) # the clang code model does not change the . to -> before applying a proposal # so, verify list of proposals roughly if useClang: expectProposal = testData.field(record, "clangProposal") == 'True' + if expectProposal and (genericProposalWidget is None): + test.warning("Expected proposal widget was not displayed as expected. " + "Trying again...") + for _ in operator: + type(cppwindow, "") + type(cppwindow, operator) + genericProposalWidget = __getGenericProposalListView__(500) test.compare(genericProposalWidget is not None, expectProposal, 'Verifying whether proposal widget is displayed as expected.')