forked from qt-creator/qt-creator
Squish: Waiting for "Cancel" button to come and go
Same concept as in progressBarWait() Change-Id: Ic8e21663f7b0831c79e440dc4aa76237dc814e5d Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -309,18 +309,11 @@ def maskSpecialCharsForSearchResult(filename):
|
||||
return filename
|
||||
|
||||
def waitForSearchResults():
|
||||
def __noCancelButton__():
|
||||
global passes
|
||||
passes += 1
|
||||
return not object.exists("{text='Cancel' type='QToolButton' unnamed='1' visible='1' "
|
||||
cancelButton = ("{text='Cancel' type='QToolButton' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
|
||||
global passes
|
||||
passes = 0
|
||||
waitFor("__noCancelButton__()", 20000)
|
||||
if passes < 2:
|
||||
test.warning("Did not have to wait for search results.",
|
||||
"Either Creator was really quick or the GUI was changed.")
|
||||
waitFor("object.exists(cancelButton)", 3000)
|
||||
waitFor("not object.exists(cancelButton)", 20000)
|
||||
|
||||
def validateSearchResult(expectedCount):
|
||||
searchResult = waitForObject(":Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton")
|
||||
|
Reference in New Issue
Block a user