diff options
author | Robert Löhning <robert.loehning@qt.io> | 2023-05-10 17:28:35 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2023-05-15 14:12:01 +0000 |
commit | a820b5490c4eb09b4b957e96d56b13ebf479f0e3 (patch) | |
tree | d9ca132960ab9a05dca486be0dcf712b27fd56fd | |
parent | 948dc6b37edaea86c067fe2c4750977d7272314e (diff) | |
download | qt-creator-a820b5490c4eb09b4b957e96d56b13ebf479f0e3.tar.gz |
SquishTests: Fix using invalid paste IDs
Change-Id: Ibc48506ff1632cbfe8d662cd00ed057af7d16a6a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/suite_tools/tst_codepasting/test.py | 6 |
1 files 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) |