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 <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2021-10-29 22:57:07 +02:00
parent 557489c3fc
commit 4980f71dd5
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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,