Squish: Try to fix test for testing machines

Change-Id: I3213594c9ad7b947c5863d22f87e62adf418d983
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
Christian Stenger
2012-12-14 10:13:05 +01:00
parent 9eff13479b
commit 0ba7f48d07

View File

@@ -82,10 +82,12 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' " clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' "
"visible='1' window=%s}" % readOnlyMBoxStr)) "visible='1' window=%s}" % readOnlyMBoxStr))
try: try:
waitForObject(cannotResetStr, 3000) # avoid an AUT crash that happens frequently on the testing machines
# should not be possible if currentApplicationContext().isRunning:
test.fail("Could not reset file '%s' to writable state." % currentFile) waitForObject(cannotResetStr, 3000)
clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr) # should not be possible
test.fail("Could not reset file '%s' to writable state." % currentFile)
clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr)
except: except:
if isWritable(currentFile): if isWritable(currentFile):
test.passes("File '%s' resetted to writable state and saved." % currentFile) test.passes("File '%s' resetted to writable state and saved." % currentFile)