From a820b5490c4eb09b4b957e96d56b13ebf479f0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 10 May 2023 17:28:35 +0200 Subject: SquishTests: Fix using invalid paste IDs Change-Id: Ibc48506ff1632cbfe8d662cd00ed057af7d16a6a Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_codepasting/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index 3d4507095f..148052a804 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -107,7 +107,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting): pasteModel = waitForObject(":PasteSelectDialog.listWidget_QListWidget").model() except: closeHTTPStatusAndPasterDialog(protocol, ':PasteSelectDialog_CodePaster::PasteSelectDialog') - return -1 + return invalidPasteId(protocol) condition = "pasteModel.rowCount() > 1" if protocol == NAME_DPCOM: # no list support @@ -125,7 +125,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting): "window=':PasteSelectDialog_CodePaster::PasteSelectDialog'}") waitFor("pasteModel.rowCount() == 1", 1000) waitFor("pasteModel.rowCount() > 1", 20000) - if pasteId == -1: + if pasteId == invalidPasteId(protocol): try: pasteLine = filter(lambda str:description in str, dumpItems(pasteModel))[0] pasteId = pasteLine.split(" ", 1)[0] @@ -207,7 +207,7 @@ def main(): test.fatal(message) continue pasteId = fetchSnippet(protocol, description, pasteId, skippedPasting) - if pasteId == -1: + if pasteId == invalidPasteId(protocol): continue filenameCombo = waitForObject(":Qt Creator_FilenameQComboBox") waitFor("not filenameCombo.currentText.isEmpty()", 20000) -- cgit v1.2.1