diff options
author | Robert Loehning <robert.loehning@digia.com> | 2012-11-02 19:34:38 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@digia.com> | 2012-11-05 12:59:07 +0100 |
commit | 77313fd980f87d6b26f989f3f3cf958e2872fc02 (patch) | |
tree | b6b58571c99d74c261001e08e693f100638d9aef /tests/system/suite_editors | |
parent | fb61be5ed62cb8803ca3c8bb5de183507c28578d (diff) | |
download | qt-creator-77313fd980f87d6b26f989f3f3cf958e2872fc02.tar.gz |
Squish: Removed pointless explicit timeouts
Change-Id: I21e41fc8d1c26186afe0d18613c764abd065227e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'tests/system/suite_editors')
-rw-r--r-- | tests/system/suite_editors/tst_qml_editor/test.py | 22 | ||||
-rw-r--r-- | tests/system/suite_editors/tst_qml_indent/test.py | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index 73605f7a30..0f851168c3 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -31,11 +31,11 @@ def testRenameId(): global searchFinished test.log("Testing rename of id") navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}", 20000) + "window=':Qt Creator_Core::Internal::MainWindow'}") model = navTree.model() files = ["Core.ContextMenu\\.qml", "Core.GridMenu\\.qml", "Core.ListMenu\\.qml", "focus\\.qml"] originalTexts = {} - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") # temporarily store editor content for synchronizing purpose # usage of formerTxt is done because I couldn't get waitForSignal() to work # it always stored a different object into the signalObjects map as it looked up afterwards @@ -45,7 +45,7 @@ def testRenameId(): doubleClickFile(navTree, file) # wait until editor content switched to the double-clicked file while formerTxt==editor.plainText: - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") # store content for next round formerTxt = editor.plainText originalTexts.setdefault(file, "%s" % formerTxt) @@ -71,7 +71,7 @@ def testRenameId(): doubleClickFile(navTree, file) # wait until editor content switched to double-clicked file while formerTxt==editor.plainText: - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") # store content for next round formerTxt = editor.plainText originalText = originalTexts.get(file).replace("mainView", "renamedView") @@ -81,7 +81,7 @@ def testRenameId(): def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expectedCount): global searchFinished doubleClickFile(treeView, filename) - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") if not placeCursorToLine(editor, line, True): test.fatal("File seems to have changed... Canceling current test") return @@ -95,7 +95,7 @@ def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expected def testFindUsages(): test.log("Testing find usage of an ID") navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}", 20000) + "window=':Qt Creator_Core::Internal::MainWindow'}") __invokeFindUsage__(navTree, "focus\\.qml", "FocusScope\s*\{", ["<Down>"], 6) test.log("Testing find usage of a property") clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) @@ -106,10 +106,10 @@ def testFindUsages(): def testHovering(): navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}", 20000) + "window=':Qt Creator_Core::Internal::MainWindow'}") test.log("Testing hovering elements") doubleClickFile(navTree, "focus\\.qml") - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") lines=["FocusScope\s*\{", "Rectangle\s*\{"] if platform.system() == "Darwin": home = "<Ctrl+Left>" @@ -127,7 +127,7 @@ def testHovering(): verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) test.log("Testing hovering properties") doubleClickFile(navTree, "focus\\.qml") - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") lines = ['focus:\s*true', 'color:\s*"black"', 'states:\s*State\s*\{', 'transitions:\s*Transition\s*\{'] expectedTypes = ["TextTip", "TextTip", "TextTip", "TextTip"] expectedValues = [ @@ -147,14 +147,14 @@ def testHovering(): verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) test.log("Testing hovering expressions") doubleClickFile(navTree, "focus\\.qml") - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") lines=['color:\s*"black"', 'color:\s*"#3E606F"'] additionalKeyPresses = ["<Left>"] expectedValues = ["black", "#3E606F"] expectedTypes = ["ColorTip", "ColorTip"] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues) doubleClickFile(navTree, "Core.ListMenu\\.qml") - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") lines=['Rectangle\s*\{.*color:\s*"#D1DBBD"', 'NumberAnimation\s*\{\s*.*Easing.OutQuint\s*\}'] additionalKeyPresses = ["<Left>", "<Left>", "<Left>", "<Left>"] expectedTypes = ["ColorTip", "TextTip"] diff --git a/tests/system/suite_editors/tst_qml_indent/test.py b/tests/system/suite_editors/tst_qml_indent/test.py index 6efdb3b2fe..acdb618e35 100644 --- a/tests/system/suite_editors/tst_qml_indent/test.py +++ b/tests/system/suite_editors/tst_qml_indent/test.py @@ -19,11 +19,11 @@ def main(): def prepareQmlFile(): # make sure the QML file is opened navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}", 20000) + "window=':Qt Creator_Core::Internal::MainWindow'}") model = navTree.model() waitForObjectItem(navTree, "untitled.QML.qml/untitled.main\\.qml") doubleClickItem(navTree, "untitled.QML.qml/untitled.main\\.qml", 5, 5, 0, Qt.LeftButton) - editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000) + editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") for i in range(3): content = "%s" % editor.plainText start = content.find("Text {") |