forked from qt-creator/qt-creator
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:
@@ -87,7 +87,6 @@ def testRenameId():
|
|||||||
formerTxt = editor.plainText
|
formerTxt = editor.plainText
|
||||||
originalText = originalTexts.get(file).replace("mainView", "renamedView")
|
originalText = originalTexts.get(file).replace("mainView", "renamedView")
|
||||||
test.compare(originalText,formerTxt, "Comparing %s" % file.replace("Core.","").replace("\\",""))
|
test.compare(originalText,formerTxt, "Comparing %s" % file.replace("Core.","").replace("\\",""))
|
||||||
invokeMenuItem("File","Save All")
|
|
||||||
|
|
||||||
def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount):
|
def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount):
|
||||||
openDocument(focusDocumentPath % filename)
|
openDocument(focusDocumentPath % filename)
|
||||||
|
@@ -46,6 +46,8 @@ def main():
|
|||||||
expectedHeaderName=headerName)
|
expectedHeaderName=headerName)
|
||||||
if not testRenameMacroAfterSourceMoving():
|
if not testRenameMacroAfterSourceMoving():
|
||||||
return
|
return
|
||||||
|
# save and exit
|
||||||
|
invokeMenuItem("File", "Save All")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|
||||||
def testRenameMacroAfterSourceModification():
|
def testRenameMacroAfterSourceModification():
|
||||||
@@ -156,8 +158,7 @@ def revertChanges(files):
|
|||||||
simpleName = simpleFileName(f)
|
simpleName = simpleFileName(f)
|
||||||
if openDocument(f):
|
if openDocument(f):
|
||||||
try:
|
try:
|
||||||
invokeMenuItem('File', 'Revert "%s" to Saved' % simpleName)
|
invokeMenuItem('Edit', 'Undo')
|
||||||
clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))
|
|
||||||
test.log("Reverted changes inside %s" % simpleName)
|
test.log("Reverted changes inside %s" % simpleName)
|
||||||
except:
|
except:
|
||||||
test.warning("File '%s' cannot be reverted." % simpleName,
|
test.warning("File '%s' cannot be reverted." % simpleName,
|
||||||
|
Reference in New Issue
Block a user