forked from qt-creator/qt-creator
SquishTests: Use existing function saveAndExit()
Change-Id: I2e10de8b454a69b3e4ade7520b4fa00415bcde42 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -209,8 +209,7 @@ def runVerify():
|
||||
availableConfigs = iterateBuildConfigs()
|
||||
if not availableConfigs:
|
||||
test.fatal("Haven't found build configurations, quitting")
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
for kit, config in availableConfigs:
|
||||
selectBuildConfig(kit, config)
|
||||
test.log("Using build config '%s'" % config)
|
||||
|
@@ -400,8 +400,7 @@ def openDocument(treeElement):
|
||||
|
||||
def earlyExit(details="No additional information"):
|
||||
test.fail("Something went wrong running this test", details)
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
||||
def openDocumentPlaceCursor(doc, line, additionalFunction=None):
|
||||
cppEditorStr = ":Qt Creator_CppEditor::Internal::CPPEditorWidget"
|
||||
|
@@ -42,7 +42,5 @@ def main():
|
||||
# wait for issues
|
||||
test.verify(waitFor("issuesModel.rowCount() == 0", 3000),
|
||||
"Verifying if error was properly cleared after code fix")
|
||||
#save and exit
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
||||
|
@@ -46,16 +46,13 @@ def main():
|
||||
waitForObjectItem(":Qt Creator_Utils::NavigationTreeView", addBranchWildcardToRoot(myCompTE), 1000)
|
||||
except:
|
||||
test.fail("Refactoring failed - file MyComponent.qml was not generated properly in project explorer")
|
||||
#save and exit
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
return
|
||||
test.passes("Refactoring - file MyComponent.qml was generated properly in project explorer")
|
||||
# open MyComponent.qml file for verification
|
||||
if not openDocument(myCompTE):
|
||||
test.fatal("Could not open MyComponent.qml.")
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
return
|
||||
editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
||||
codeText = str(editorArea.plainText)
|
||||
|
@@ -19,8 +19,7 @@ def verifyNextLineIndented(editorArea, expectedIndentation):
|
||||
def verifyIndentation(editorArea):
|
||||
#verify indentation
|
||||
if not placeCursorToLine(editorArea, "id: wdw"):
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
return False
|
||||
type(editorArea, "<Up>")
|
||||
expectedIndentations = [1,1,1,2,2,2,2,3,3,3,4,3,3,2,1]
|
||||
@@ -58,6 +57,4 @@ def main():
|
||||
# verify invoked indentation
|
||||
if not verifyIndentation(editorArea):
|
||||
return
|
||||
# save and exit
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
@@ -196,9 +196,8 @@ def main():
|
||||
if current.endswith(".lhs"):
|
||||
type(editor, ">")
|
||||
type(editor, "<Tab>")
|
||||
saveAndExit()
|
||||
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
|
||||
def init():
|
||||
syntaxDirectory = __highlighterDefinitionsDirectory__()
|
||||
|
@@ -24,9 +24,7 @@ def main():
|
||||
expectedHeaderName=headerName)
|
||||
if not testRenameMacroAfterSourceMoving():
|
||||
return
|
||||
# save and exit
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
||||
def testRenameMacroAfterSourceModification():
|
||||
def __deleteAnyClass__():
|
||||
|
@@ -21,8 +21,7 @@ def main():
|
||||
qmlFiles = [treebase + "focus\\.qml", treebase + "Core.ListMenu\\.qml"]
|
||||
checkOutlineFor(qmlFiles)
|
||||
testModify()
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
||||
def checkOutlineFor(qmlFiles):
|
||||
for qmlFile in qmlFiles:
|
||||
|
@@ -46,5 +46,4 @@ def main():
|
||||
'Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), "ui->%s" % buttonName))
|
||||
type(editor, "<Shift+Delete>") # Delete line
|
||||
selectFromLocator("mainwindow.ui")
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
@@ -33,5 +33,4 @@ def main():
|
||||
type(editor, "<Up>")
|
||||
test.verify(waitFor('str(lineUnderCursor(editor)).strip() == con[3]', 1000),
|
||||
'Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), con[3]))
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
saveAndExit()
|
||||
|
Reference in New Issue
Block a user