Squish: Update editor tests

Change-Id: Idcc7de48f30438b2d26512999fe8c7a785d0f3dd
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2014-06-26 11:24:03 +02:00
parent be1266b6d4
commit 922f25170c
3 changed files with 10 additions and 10 deletions

View File

@@ -103,9 +103,9 @@
:JavaScript.QmlProfilerEventsTable_QmlProfiler::Internal::QV8ProfilerEventsMainView {container=':*Qt Creator.JavaScript_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QV8ProfilerEventsMainView' visible='1'} :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'} :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'} :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_Utils::FileWizardDialog'} :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_Utils::FileWizardDialog'} :New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit {name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1' window=':New Text File_Core::BaseFileWizard'}
:New Text File_Utils::FileWizardDialog {type='Utils::FileWizardDialog' unnamed='1' visible='1' windowTitle='New Text File'} :New Text File_Core::BaseFileWizard {type='Core::BaseFileWizard' unnamed='1' visible='1' windowTitle='New Text File'}
:New.comboBox_QComboBox {name='comboBox' type='QComboBox' visible='1' window=':New_Core::Internal::NewDialog'} :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.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'} :New.templateCategoryView_QTreeView {name='templateCategoryView' type='QTreeView' visible='1' window=':New_Core::Internal::NewDialog'}

View File

@@ -719,7 +719,7 @@ def addCPlusPlusFileToCurrentProject(name, template, forceOverwrite=False, addTo
test.fatal("File must have a name - got None.") test.fatal("File must have a name - got None.")
return return
__createProjectOrFileSelectType__(" C++", template, isProject=False) __createProjectOrFileSelectType__(" C++", template, isProject=False)
window = "{type='Utils::FileWizardDialog' unnamed='1' visible='1'}" window = "{type='Core::BaseFileWizard' unnamed='1' visible='1'}"
basePath = str(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' " basePath = str(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"window=%s}" % window).text) "window=%s}" % window).text)
lineEdit = waitForObject("{name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' " lineEdit = waitForObject("{name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' "

View File

@@ -34,12 +34,12 @@ def createFile(folder, filename):
replaceEditorContent(waitForObject("{name='nameLineEdit' visible='1' " replaceEditorContent(waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::FileNameValidatingLineEdit'}"), filename) "type='Utils::FileNameValidatingLineEdit'}"), filename)
replaceEditorContent(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' " replaceEditorContent(waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"window=':New Text File_Utils::FileWizardDialog'}"), folder) "window=':New Text File_Core::BaseFileWizard'}"), folder)
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleLastPage__() __createProjectHandleLastPage__()
def clickTableGetPatternLineEdit(table, row): def clickTableGetPatternLineEdit(table, row):
clickItem(table, "%d/0" % row, 5, 5, 0, Qt.LeftButton) clickItem(table, row, 5, 5, 0, Qt.LeftButton)
return waitForObject("{name='patternsLineEdit' type='QLineEdit' visible='1'}") return waitForObject("{name='patternsLineEdit' type='QLineEdit' visible='1'}")
def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None): def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None):
@@ -54,11 +54,11 @@ def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None):
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "MIME Types") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "MIME Types")
replaceEditorContent(waitForObject("{name='filterLineEdit' type='QLineEdit' visible='1'}"), replaceEditorContent(waitForObject("{name='filterLineEdit' type='QLineEdit' visible='1'}"),
filter) filter)
mimeTypeTable = waitForObject("{name='mimeTypesTableView' type='QTableView' visible='1'}") mimeTypeTable = waitForObject("{name='mimeTypesTreeView' type='QTreeView' visible='1'}")
model = mimeTypeTable.model() model = mimeTypeTable.model()
if filter == '': if filter == '':
for row in range(model.rowCount()): for row in dumpItems(model):
if str(model.data(model.index(row, 0)).toString()) == mimeType: if row == mimeType:
result = toSuffixArray(str(clickTableGetPatternLineEdit(mimeTypeTable, row).text)) result = toSuffixArray(str(clickTableGetPatternLineEdit(mimeTypeTable, row).text))
break break
clickButton(":Options.Cancel_QPushButton") clickButton(":Options.Cancel_QPushButton")
@@ -67,7 +67,7 @@ def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None):
return result return result
waitFor('model.rowCount() == 1', 2000) waitFor('model.rowCount() == 1', 2000)
if model.rowCount() == 1: if model.rowCount() == 1:
patternsLineEd = clickTableGetPatternLineEdit(mimeTypeTable, 0) patternsLineEd = clickTableGetPatternLineEdit(mimeTypeTable, dumpItems(model)[0])
patterns = str(patternsLineEd.text) patterns = str(patternsLineEd.text)
if toBePresent: if toBePresent:
actualSuffixes = toSuffixArray(patterns) actualSuffixes = toSuffixArray(patterns)