forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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'}
|
||||
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user