Commit 42236fc7 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix some tests due to latest refactorings in QC

Refactoring of dialog wizards and editors.

Change-Id: I6604a302b04579519c78698375bc4b1027ac8b02
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 8fe9df26
......@@ -108,9 +108,9 @@
:JavaScript.QmlProfilerEventsTable_QmlProfiler::Internal::QV8ProfilerEventsMainView {container=':*Qt Creator.JavaScript_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QV8ProfilerEventsMainView' visible='1'}
:Kits_QtVersion_QComboBox {container=':qt_tabwidget_stackedwidget_QWidget' occurrence='5' type='QComboBox' unnamed='1' visible='1'}
:Locals and Expressions_Debugger::Internal::WatchTreeView {container=':DebugModeWidget.Locals and Expressions_QDockWidget' name='WatchWindow' type='Debugger::Internal::WatchTreeView' visible='1' windowTitle='Locals and Expressions'}
:New Text File.Add to project:_QLabel {name='projectLabel' text='Add to project:' type='QLabel' visible='1' window=':New Text File_Core::BaseFileWizard'}
:New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit {name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1' window=':New Text File_Core::BaseFileWizard'}
:New Text File_Core::BaseFileWizard {type='Core::BaseFileWizard' unnamed='1' visible='1' windowTitle='New Text File'}
:New Text File.Add to project:_QLabel {name='projectLabel' text='Add to project:' type='QLabel' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
:New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit {name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
:New Text File_ProjectExplorer::JsonWizard {type='ProjectExplorer::JsonWizard' unnamed='1' visible='1'}
:New.comboBox_QComboBox {name='comboBox' type='QComboBox' visible='1' window=':New_Core::Internal::NewDialog'}
:New.frame_QFrame {name='frame' type='QFrame' visible='1' window=':New_Core::Internal::NewDialog'}
:New.templateCategoryView_QTreeView {name='templateCategoryView' type='QTreeView' visible='1' window=':New_Core::Internal::NewDialog'}
......@@ -171,7 +171,7 @@
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::Internal::QmlJSEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_TextEditor::BaseTextEditorWidget {type='TextEditor::BaseTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_TextEditor::TextEditorWidget {type='TextEditor::TextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit {container=':Qt Creator_Utils::NavigationTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'}
:Qt Gui Application.Form file:_QLabel {name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'}
......
......@@ -276,11 +276,11 @@ def getEditorForFileSuffix(curFile, treeViewSyntax=False):
elif suffix in qmlEditorSuffixes:
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
elif suffix in proEditorSuffixes or suffix in glslEditorSuffixes or suffix in pytEditorSuffixes:
editor = waitForObject(":Qt Creator_TextEditor::BaseTextEditorWidget")
editor = waitForObject(":Qt Creator_TextEditor::TextEditorWidget")
else:
test.log("Trying BaseTextEditorWidget (file suffix: %s)" % suffix)
test.log("Trying TextEditorWidget (file suffix: %s)" % suffix)
try:
editor = waitForObject(":Qt Creator_TextEditor::BaseTextEditorWidget", 3000)
editor = waitForObject(":Qt Creator_TextEditor::TextEditorWidget", 3000)
except:
test.fatal("Unsupported file suffix for file '%s'" % curFile)
editor = None
......
......@@ -722,7 +722,7 @@ def addCPlusPlusFileToCurrentProject(name, template, forceOverwrite=False, addTo
test.fatal("File must have a name - got None.")
return
__createProjectOrFileSelectType__(" C++", template, isProject=False)
window = "{type='Core::BaseFileWizard' unnamed='1' visible='1'}"
window = "{type='ProjectExplorer::JsonWizard' unnamed='1' visible='1'}"
basePath = str(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"window=%s}" % window).text)
lineEdit = waitForObject("{name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' "
......
......@@ -55,7 +55,7 @@ def main():
# Rely on code completion for closing bracket
invokeMenuItem("File", "Save All")
openDocument(project + "." + project + "\\.pro")
proEditor = waitForObject(":Qt Creator_TextEditor::BaseTextEditorWidget")
proEditor = waitForObject(":Qt Creator_TextEditor::TextEditorWidget")
test.verify("CONFIG += console" in str(proEditor.plainText), "Verifying that program is configured with console")
availableConfigs = iterateBuildConfigs(len(checkedTargets))
......
......@@ -34,7 +34,8 @@ def createFile(folder, filename):
replaceEditorContent(waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::FileNameValidatingLineEdit'}"), filename)
replaceEditorContent(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"window=':New Text File_Core::BaseFileWizard'}"), folder)
"window={type='ProjectExplorer::JsonWizard' unnamed='1' "
"visible='1'}}"), folder)
clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleLastPage__()
......@@ -172,6 +173,9 @@ def main():
for current in filesToTest:
createFile(folder, current)
editor = getEditorForFileSuffix(current)
if editor == None:
earlyExit("Something's really wrong! (did the UI change?)")
return
expectHint = hasSuffix(current, patterns)
mssg = "Verifying whether hint for missing highlight definition is present. (expected: %s)"
try:
......
......@@ -32,7 +32,7 @@ source("../../shared/qtcreator.py")
def main():
global testFolder
cppEditorStr = ":Qt Creator_CppEditor::Internal::CPPEditorWidget"
proEditorStr = ":Qt Creator_TextEditor::BaseTextEditorWidget"
proEditorStr = ":Qt Creator_TextEditor::TextEditorWidget"
testFolder = prepareTemplate(os.path.abspath(os.path.join(os.getcwd(), "..", "shared",
"simplePlainCPP")))
if testFolder == None:
......
......@@ -76,7 +76,7 @@ def __modifyFile__(fileName, modificationFunc):
# add some stuff to pro file
def __modifyProFile__():
proEditorStr = ":Qt Creator_TextEditor::BaseTextEditorWidget"
proEditorStr = ":Qt Creator_TextEditor::TextEditorWidget"
addConfig = ["", "CONFIG += thread", "",
"lessThan(QT_VER_MAJ, 4) | lessThan(QT_VER_MIN, 7) {",
" error(Qt 4.7 or newer is required but version $$[QT_VERSION] was detected.)",
......
......@@ -152,7 +152,7 @@ def main():
clickButton(waitForObject(":Next_QPushButton"))
readmeName += ".txt"
__createProjectHandleLastPage__([readmeName], "Git", "<None>")
replaceEditorContent(waitForObject(":Qt Creator_TextEditor::BaseTextEditorWidget"),
replaceEditorContent(waitForObject(":Qt Creator_TextEditor::TextEditorWidget"),
"Some important advice in the README")
invokeMenuItem("File", "Save All")
commitsInProject = list(commitMessages) # deep copy
......
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