Commit 1f1e0e3b authored by Christian Stenger's avatar Christian Stenger

Squish: Fix suite_CSUP

Change-Id: I0fecbb1ea1853fca231b68de7bc28aceb4289065
Reviewed-by: default avatarRobert Loehning <>
parent df35fe0f
......@@ -63,7 +63,7 @@ def main():
"Step 2: Verifying if: .cpp file is opened in Edit mode.")
# Step 3: Insert text "re" to new line in Editor mode and press Ctrl+Space.
editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
if not placeCursorToLine(editorWidget, "QApplication app(argc, argv);"):
if not placeCursorToLine(editorWidget, "QGuiApplication app(argc, argv);"):
earlyExit("Did not find first line in function block.")
type(editorWidget, "<Return>")
......@@ -30,10 +30,11 @@
inputDialog = "{type='QInputDialog' unnamed='1' visible='1'}"
inputDialog = "{type='QDialog' unnamed='1' visible='1' windowTitle='Extract Function Refactoring'}"
def revertMainCpp():
invokeMenuItem('File', 'Revert "main.cpp" to Saved')
waitFor("object.exists(':Revert to Saved_QMessageBox')", 1000)
clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))
def constructExpectedCode(original, codeLines, funcSuffix):
......@@ -109,9 +110,9 @@ def main():
markText(editor, "Right", 2)
snooze(1) # avoid timing issue with the parser
invokeContextMenuItem(editor, 'Refactor', 'Extract Function')
funcEdit = waitForObject("{buddy={text='Enter function name' type='QLabel' unnamed='1' "
"visible='1' window=%s} type='QLineEdit' unnamed='1' visible='1'}"
% inputDialog)
funcEdit = waitForObject("{buddy={text='Function name' type='QLabel' unnamed='1' "
"visible='1' window=%s} type='Utils::FancyLineEdit' "
"unnamed='1' visible='1'}" % inputDialog)
replaceEditorContent(funcEdit, "myFunc%s" % funcSuffix)
clickButton(waitForObject("{text='OK' type='QPushButton' unnamed='1' visible='1' window=%s}"
% inputDialog))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment