summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-12-15 12:03:49 +0100
committerEike Ziller <eike.ziller@qt.io>2022-12-15 12:03:49 +0100
commit308a12b8338be650389786532714fe83364b8c55 (patch)
tree78fa6ce797291e1404062f8fa9824df7a114d059 /tests
parent2d0456f08509092b2bd882a723b8b26b2143945a (diff)
parent75c43f926b95cb7ac546ec8929e6e759320e7d89 (diff)
downloadqt-creator-308a12b8338be650389786532714fe83364b8c55.tar.gz
Merge remote-tracking branch 'origin/9.0'
Change-Id: I5b66ee9645904c9e736552d0d2c5f1b7c520dfbb
Diffstat (limited to 'tests')
-rw-r--r--tests/system/objects.map10
-rw-r--r--tests/system/shared/editor_utils.py13
-rw-r--r--tests/system/suite_tools/tst_codepasting/test.py2
3 files changed, 17 insertions, 8 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map
index 074275eba8..09ef250542 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -2,7 +2,7 @@
:*Qt Creator.Cancel Build_QToolButton {text='Cancel Build' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Continue_Core::Internal::FancyToolButton {name='Debug.Button' toolTip?='Continue *' type='Core::Internal::FancyToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:*Qt Creator.Find_Find::Internal::FindToolBar {name='Core__Internal__FindWidget' type='Core::Internal::FindToolBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Find'}
+:*Qt Creator.Find_Find::Internal::FindToolBar {type='Core::Internal::FindToolBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Find'}
:*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack {name='FormEditorStack' type='Designer::Internal::FormEditorStack' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Interrupt_Core::Internal::FancyToolButton {name='Debug.Button' toolTip='Interrupt' type='Core::Internal::FancyToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.ProjectSelectorDockWidget_QDockWidget {name='ProjectSelectorDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -61,7 +61,7 @@
:Dialog.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog.componentNameEdit_QLineEdit {name='componentNameEdit' type='Utils::ClassNameValidatingLineEdit' visible='1' window=':Dialog_QmlJSEditor::Internal::ComponentNameDialog'}
:Dialog_Debugger::Internal::SymbolPathsDialog {name='Debugger__Internal__SymbolPathsDialog' type='Debugger::Internal::SymbolPathsDialog' visible='1' windowTitle='Dialog'}
-:Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'}
+:Dialog_QmlJSEditor::Internal::ComponentNameDialog {type='QmlJSEditor::Internal::ComponentNameDialog' unnamed='1' visible='1' windowTitle='Move Component into Separate File'}
:Events.QmlProfilerEventsTable_QmlProfiler::Internal::QmlProfilerStatisticsMainView {container=':Qt Creator.Events_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QmlProfilerStatisticsMainView' visible='1'}
:Failed to start application_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Failed to start application'}
:File has been removed.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':File has been removed_QMessageBox'}
@@ -118,7 +118,7 @@
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:Qt Creator.CloseFind_QToolButton {name='closeFindToolBarButton' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -132,8 +132,8 @@
:Qt Creator.QML debugging and profiling:_QLabel {text='QML debugging and profiling:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.ReRun_QToolButton {toolTip='Re-run this run-configuration.' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:Qt Creator.Replace_QToolButton {name='replaceButton' text='Replace' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:Qt Creator.Replace All_QToolButton {text='Replace All' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:Qt Creator.Replace_QToolButton {text='Replace' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Timeline_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='QmlProfiler.Timeline.DockDockWidget' type='QDockWidget' visible='1'}
:Qt Creator.Timeline_QTabBar {aboveWidget=':Qt Creator.Timeline_QDockWidget' container=':Qt Creator.DebugModeWidget_QSplitter' type='QTabBar' unnamed='1' visible='1'}
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index 4aa008515e..60ed802745 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -336,9 +336,16 @@ def validateSearchResult(expectedCount):
# this function invokes context menu and command from it
def invokeContextMenuItem(editorArea, command1, command2 = None):
- ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
- snooze(1)
- item1 = waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000)
+ for _ in range(2):
+ ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
+ snooze(1)
+ try:
+ item1 = waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000)
+ break
+ except:
+ test.warning("Context menu item not ready (%s) - trying once more." % command1)
+ type(editorArea, "<Escape>")
+
if command2 and platform.system() == 'Darwin':
mouseMove(item1)
activateItem(item1)
diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py
index 1275052156..fd389490ea 100644
--- a/tests/system/suite_tools/tst_codepasting/test.py
+++ b/tests/system/suite_tools/tst_codepasting/test.py
@@ -53,6 +53,8 @@ def pasteFile(sourceFile, protocol):
typeLines(editor, "// tst_codepasting %s" % datetime.utcnow())
sourceText = editor.plainText
invokeMenuItem("Tools", "Code Pasting", "Paste Snippet...")
+ pasteView = waitForObject(":Send to Codepaster_CodePaster::PasteView")
+ waitFor("pasteView.isActiveWindow")
selectFromCombo(":Send to Codepaster.protocolBox_QComboBox", protocol)
pasteEditor = waitForObject(":stackedWidget.plainTextEdit_QPlainTextEdit")
test.compare(pasteEditor.plainText, sourceText, "Verify that dialog shows text from the editor")