Squish: Stabilize tst_external_sort

Change-Id: I4c580c160f1035ed04ec2b1d1fc9e0c79f8813fa
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2014-04-16 15:22:18 +02:00
parent 70e47527bc
commit 6827072fac

View File

@@ -37,10 +37,11 @@ def main():
unsortedFile = os.path.join(os.getcwd(), "testdata", "unsorted.txt")
sorted = getOutputFromCmdline("sort %s" % unsortedFile).replace("\r", "")
selectFromFileDialog(unsortedFile)
invokeMenuItem("Edit", "Select All")
invokeMenuItem("Tools", "External", "Text", "Sort Selection")
editor = waitForObject("{type='TextEditor::PlainTextEditorWidget' unnamed='1' "
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000)
placeCursorToLine(editor, "bbb")
invokeMenuItem("Edit", "Select All")
invokeMenuItem("Tools", "External", "Text", "Sort Selection")
test.verify(waitFor("str(editor.plainText) == sorted", 2000),
"Verify that sorted text\n%s\nmatches the expected text\n%s" % (editor.plainText, sorted))
invokeMenuItem('File', 'Revert "unsorted.txt" to Saved')