From 4980f71dd5d800a69e38264a64f1d103d7c156ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Fri, 29 Oct 2021 22:57:07 +0200 Subject: Squish: Update tests which use "Rename Symbol Under Cursor" When using this on open files, Creator used to make the changes but not save the file. Creator 6 now also saves the file unless it already contained other changes. Because the file is being saved immediately, "Save All" and "Revert to Saved" cannot be used in this situation anymore. Change-Id: I0b8a58d998c54ccceae6d178b2c7a6f6182c7ad0 Reviewed-by: Christian Stenger --- tests/system/suite_editors/tst_qml_editor/test.py | 1 - tests/system/suite_editors/tst_rename_macros/test.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index c26207ea6ec..e75db758939 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -87,7 +87,6 @@ def testRenameId(): formerTxt = editor.plainText originalText = originalTexts.get(file).replace("mainView", "renamedView") test.compare(originalText,formerTxt, "Comparing %s" % file.replace("Core.","").replace("\\","")) - invokeMenuItem("File","Save All") def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount): openDocument(focusDocumentPath % filename) diff --git a/tests/system/suite_editors/tst_rename_macros/test.py b/tests/system/suite_editors/tst_rename_macros/test.py index 491cc3bd200..f1111f8583c 100644 --- a/tests/system/suite_editors/tst_rename_macros/test.py +++ b/tests/system/suite_editors/tst_rename_macros/test.py @@ -46,6 +46,8 @@ def main(): expectedHeaderName=headerName) if not testRenameMacroAfterSourceMoving(): return + # save and exit + invokeMenuItem("File", "Save All") invokeMenuItem("File", "Exit") def testRenameMacroAfterSourceModification(): @@ -156,8 +158,7 @@ def revertChanges(files): simpleName = simpleFileName(f) if openDocument(f): try: - invokeMenuItem('File', 'Revert "%s" to Saved' % simpleName) - clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) + invokeMenuItem('Edit', 'Undo') test.log("Reverted changes inside %s" % simpleName) except: test.warning("File '%s' cannot be reverted." % simpleName, -- cgit v1.2.3