From 322853ec695384d06a24d96e93275a5cc1d84e3a Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 30 May 2013 14:36:54 +0200 Subject: [PATCH] Squish: Don't let test run into ScriptError... ...if former verification already fails. Change-Id: I0a5d60f6a91158ed1decdedd8aa7e98ac047a44b Reviewed-by: Robert Loehning --- tests/system/suite_QMLS/tst_QMLS01/test.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/system/suite_QMLS/tst_QMLS01/test.py b/tests/system/suite_QMLS/tst_QMLS01/test.py index 36ad9f9176d..0b65f47b43c 100644 --- a/tests/system/suite_QMLS/tst_QMLS01/test.py +++ b/tests/system/suite_QMLS/tst_QMLS01/test.py @@ -62,8 +62,10 @@ def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion): if not __beginTestSuggestions__(editorArea, lineText, textToType): return False # check if suggestions are shown - test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView"), - "Verifying if suggestions in automatic mode are shown.") + if not test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView"), + "Verifying if suggestions in automatic mode are shown."): + __endTestSuggestions__(editorArea) + return False # verify proposed suggestions verifySuggestions(textToType) # test if suggestion can be selected with keyToUseSuggestion @@ -83,8 +85,10 @@ def testSuggestionsManual(lineText, textToType, expectedText): if not __beginTestSuggestions__(editorArea, lineText, textToType): return False # wait if automatic popup displayed - if yes then fail, because we are in manual mode - test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView", False), - "Verifying if suggestions in manual mode are properly not automatically shown") + if not test.verify(checkIfObjectExists(":popupFrame_Proposal_QListView", False), + "Verifying if suggestions in manual mode are not automatically shown"): + __endTestSuggestions__(editorArea) + return False # test if suggestion can be invoked manually if platform.system() == "Darwin": type(editorArea, "")