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
|
return filename
|
||||||
|
|
||||||
def waitForSearchResults():
|
def waitForSearchResults():
|
||||||
def __noCancelButton__():
|
cancelButton = ("{text='Cancel' type='QToolButton' unnamed='1' visible='1' "
|
||||||
global passes
|
|
||||||
passes += 1
|
|
||||||
return not object.exists("{text='Cancel' type='QToolButton' unnamed='1' visible='1' "
|
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||||
|
|
||||||
global passes
|
waitFor("object.exists(cancelButton)", 3000)
|
||||||
passes = 0
|
waitFor("not object.exists(cancelButton)", 20000)
|
||||||
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.")
|
|
||||||
|
|
||||||
def validateSearchResult(expectedCount):
|
def validateSearchResult(expectedCount):
|
||||||
searchResult = waitForObject(":Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton")
|
searchResult = waitForObject(":Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton")
|
||||||
|
Reference in New Issue
Block a user