From 702402a638879e24104e76ef0bf3dd0ef6c17628 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 8 Jul 2013 12:24:22 +0200 Subject: Squish: Avoid false positive warnings Change-Id: I6cf15b571aae9a1ba4dcd02048e7ca6b21fab1da Reviewed-by: Robert Loehning --- tests/system/shared/utils.py | 7 ++++--- tests/system/suite_HELP/tst_HELP04/test.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/system') diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 4960b41d0f..d90f39ad0b 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -642,10 +642,11 @@ def checkIfObjectExists(name, shouldExist = True, timeout = 3000, verboseOnFail return result # wait for progress bar(s) to appear and disappear -def progressBarWait(timeout=60000): +def progressBarWait(timeout=60000, warn=True): if not checkIfObjectExists(":Qt Creator_Core::Internal::ProgressBar", True, 6000): - test.warning("progressBarWait() timed out when waiting for ProgressBar.", - "This may lead to unforeseen behavior. Consider increasing the timeout.") + if warn: + test.warning("progressBarWait() timed out when waiting for ProgressBar.", + "This may lead to unforeseen behavior. Consider increasing the timeout.") checkIfObjectExists(":Qt Creator_Core::Internal::ProgressBar", False, timeout) def readFile(filename): diff --git a/tests/system/suite_HELP/tst_HELP04/test.py b/tests/system/suite_HELP/tst_HELP04/test.py index 881e59490b..42837a730a 100755 --- a/tests/system/suite_HELP/tst_HELP04/test.py +++ b/tests/system/suite_HELP/tst_HELP04/test.py @@ -93,7 +93,7 @@ def main(): mouseClick(waitForObject(":Qt Creator.Help_Search for:_QLineEdit")) replaceEditorContent(":Qt Creator.Help_Search for:_QLineEdit", searchKeyword) type(waitForObject(":Qt Creator.Help_Search for:_QLineEdit"), "") - progressBarWait() + progressBarWait(warn=False) if shouldFind: test.verify(waitFor("re.match('[1-9]\d* - [1-9]\d* of [1-9]\d* Hits'," "str(findObject(':Hits_QLabel').text))", 2000), @@ -129,7 +129,7 @@ def main(): # advanced search - do search clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' " "window=':Qt Creator_Core::Internal::MainWindow'}")) - progressBarWait() + progressBarWait(warn=False) # verify that advanced search results found test.verify(waitFor("re.search('1 - 2 of 2 Hits'," "str(findObject(':Hits_QLabel').text))", 3000), -- cgit v1.2.1