diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index 4b3a279990e..f296b9942b1 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -263,6 +263,10 @@ def getEditorForFileSuffix(curFile): glslEditorSuffixes= ["frag", "vert", "fsh", "vsh", "glsl", "shader", "gsh"] pytEditorSuffixes = ["py", "pyw", "wsgi"] suffix = __getFileSuffix__(curFile) + mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow") + if not waitFor("os.path.basename(curFile) in str(mainWindow.windowTitle)", 5000): + test.fatal("Window title (%s) did not switch to expected file (%s)." + % (str(mainWindow.windowTitle), os.path.basename(curFile))) try: if suffix in cppEditorSuffixes: editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") diff --git a/tests/system/suite_editors/tst_generic_highlighter/test.py b/tests/system/suite_editors/tst_generic_highlighter/test.py index 5c4c235889b..df2ab56eff7 100644 --- a/tests/system/suite_editors/tst_generic_highlighter/test.py +++ b/tests/system/suite_editors/tst_generic_highlighter/test.py @@ -168,12 +168,9 @@ def main(): filesToTest = ["Main.lhs", "Main.hs"] code = ['module Main where', '', 'main :: IO ()', '', 'main = putStrLn "Hello World!"'] - mainWindow = waitForObject(':Qt Creator_Core::Internal::MainWindow') for current in filesToTest: createFile(folder, current) editor = getEditorForFileSuffix(current) - test.verify(waitFor("current in str(mainWindow.windowTitle)", 5000), - "Window title changed to current file.") expectHint = hasSuffix(current, patterns) mssg = "Verifying whether hint for missing highlight definition is present. (expected: %s)" try: