diff options
author | Robert Löhning <robert.loehning@qt.io> | 2022-10-21 21:49:34 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2022-10-24 07:14:00 +0000 |
commit | 061948e2e60db6ad94cde210cf7d4074d0bcc533 (patch) | |
tree | accb5bfea7711382ec4a1353a6018b8f9de0b2be | |
parent | b1a3e136b618612c2bc60eee5ca0adcf542ba18b (diff) |
SquishTests: Update SaveItemsDialog and ReadOnlyFilesDialog
Fixes tst_modify_readonly
Change-Id: I1ba81af321a8ca3d5498d68e2d85abd1214546b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/objects.map | 6 | ||||
-rw-r--r-- | tests/system/suite_editors/tst_modify_readonly/test.py | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map index b11851c291c..ac99c454fdb 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -176,10 +176,10 @@ :Restart required_QMessageBox {text='The language change will take effect after restart.' type='QMessageBox' unnamed='1' visible='1'} :Revert to Saved.Proceed_QPushButton {text='Proceed' type='QPushButton' unnamed='1' visible='1' window=':Revert to Saved_QMessageBox'} :Revert to Saved_QMessageBox {text?='You will lose your current changes if you proceed reverting*' type='QMessageBox' unnamed='1' visible='1'} -:Save Changes.Always save files before build_QCheckBox {name='saveBeforeBuildCheckBox' text='Always save files before build' type='QCheckBox' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} +:Save Changes.Always save files before build_QCheckBox {text='Always save files before build' type='QCheckBox' unnamed='1' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} :Save Changes.Do not Save_QPushButton {text='Do Not Save' type='QPushButton' unnamed='1' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} :Save Changes.Save All_QPushButton {text='Save All' type='QPushButton' unnamed='1' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} -:Save Changes_Core::Internal::SaveItemsDialog {name='Core__Internal__SaveItemsDialog' type='Core::Internal::SaveItemsDialog' visible='1' windowTitle='Save Changes'} +:Save Changes_Core::Internal::SaveItemsDialog {type='Core::Internal::SaveItemsDialog' unnamed='1' visible='1' windowTitle='Save Changes'} :Select a Git Commit.Show_QPushButton {name='showButton' text='Show' type='QPushButton' visible='1' window=':Select a Git Commit_Git::Internal::ChangeSelectionDialog'} :Select a Git Commit.changeNumberEdit_Utils::CompletingLineEdit {name='changeNumberEdit' type='Utils::CompletingLineEdit' visible='1' window=':Select a Git Commit_Git::Internal::ChangeSelectionDialog'} :Select a Git Commit.detailsText_QPlainTextEdit {name='detailsText' type='QPlainTextEdit' visible='1' window=':Select a Git Commit_Git::Internal::ChangeSelectionDialog'} @@ -197,7 +197,7 @@ :Utils::FakeToolTip {type='Utils::FakeToolTip' unnamed='1' visible='1'} :Widget Box_qdesigner_internal::WidgetBoxTreeWidget {container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'} :Working Copy_Utils::BaseValidatingLineEdit {type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':New_ProjectExplorer::JsonWizard'} -:WritePermissions_Core::Internal::ReadOnlyFilesDialog {name='Core__Internal__ReadOnlyFilesDialog' type='Core::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'} +:WritePermissions_Core::Internal::ReadOnlyFilesDialog {type='Core::ReadOnlyFilesDialog' unnamed='1' visible='1' windowTitle='Files Without Write Permissions'} :addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'} :formFileLineEdit_Utils::FileNameValidatingLineEdit {name='FormFileName' type='Utils::FancyLineEdit' visible='1' window=':New_ProjectExplorer::JsonWizard'} :frame.templateDescription_QTextBrowser {container=':New.frame_QFrame' name='templateDescription' type='QTextBrowser' visible='1'} diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py index 355283903b7..0bb68a8ed3c 100644 --- a/tests/system/suite_editors/tst_modify_readonly/test.py +++ b/tests/system/suite_editors/tst_modify_readonly/test.py @@ -62,20 +62,19 @@ def testModifyFile(fileName, editor, line, expectWarning): return checkOpenDocumentsContains("%s*" % simpleFName) def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): - saveDlgStr = ("{name='Core__Internal__SaveItemsDialog' type='Core::Internal::SaveItemsDialog' " - "visible='1' windowTitle='Save Changes'}") + saveDlgStr = ":Save Changes_Core::Internal::SaveItemsDialog" try: waitForObject(saveDlgStr) except: test.fail("Save Changes dialog did not come up, but was expected to appear.") return - treeWidget = waitForObject("{name='treeWidget' type='QTreeWidget' visible='1' window=%s}" + treeWidget = waitForObject("{type='QTreeWidget' unnamed='1' visible='1' window='%s'}" % saveDlgStr) checkUnsavedChangesContains(treeWidget.model(), modifiedFiles) clickButton(waitForObject("{text='Save All' type='QPushButton' unnamed='1' visible='1' " - "window=%s}" % saveDlgStr)) + "window='%s'}" % saveDlgStr)) try: - filesTree = waitForObject("{name='treeWidget' type='QTreeWidget' visible='1' " + filesTree = waitForObject("{type='QTreeWidget' unnamed='1' visible='1' " "window=':WritePermissions_Core::Internal::ReadOnlyFilesDialog'}") items = map(os.path.expanduser, map(os.path.join, dumpItems(filesTree.model(), column=4), dumpItems(filesTree.model(), column=3))) @@ -102,7 +101,7 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): test.log("Exiting without saving.") waitForObject(saveDlgStr) clickButton(waitForObject("{text='Do not Save' type='QPushButton' unnamed='1' " - "visible='1' window=%s}" % saveDlgStr)) + "visible='1' window='%s'}" % saveDlgStr)) def checkOpenDocumentsContains(itemName): selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Open Documents") |