forked from qt-creator/qt-creator
SquishTests: Adapt to changed reload behavior
The default for the reload behavior has changed, so explicitly set the setting when necessary. Change-Id: Ibcc3e8d2decf3f50dd3d1288c38ec3d027fbc23e Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -630,3 +630,13 @@ class GitClone:
|
|||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
deleteDirIfExists(self.localPath)
|
deleteDirIfExists(self.localPath)
|
||||||
|
|
||||||
|
|
||||||
|
def setReloadBehavior(to):
|
||||||
|
# QC 14 changed the default, so change the preferences
|
||||||
|
invokeMenuItem("Edit", "Preferences...")
|
||||||
|
mouseClick(waitForObjectItem(":Options_QListView", "Environment"))
|
||||||
|
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "System")
|
||||||
|
selectFromCombo("{type='QComboBox' unnamed='1' leftWidget={type='QLabel' "
|
||||||
|
"text='When files are externally modified:'}}", to)
|
||||||
|
clickButton(":Options.OK_QPushButton")
|
||||||
|
@@ -10,6 +10,9 @@ def main():
|
|||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
setReloadBehavior("Always Ask")
|
||||||
|
|
||||||
for currentFile in files:
|
for currentFile in files:
|
||||||
test.log("Opening file %s" % currentFile)
|
test.log("Opening file %s" % currentFile)
|
||||||
invokeMenuItem("File", "Open File or Project...")
|
invokeMenuItem("File", "Open File or Project...")
|
||||||
|
@@ -23,6 +23,8 @@ def main():
|
|||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
setReloadBehavior("Always Ask")
|
||||||
|
|
||||||
mBox = ("{text?='The file * has been changed on disk. Do you want to reload it?' "
|
mBox = ("{text?='The file * has been changed on disk. Do you want to reload it?' "
|
||||||
"type='QMessageBox' unnamed='1' visible='1'}")
|
"type='QMessageBox' unnamed='1' visible='1'}")
|
||||||
popupText = ("<p>The file <i>%s</i> has been changed on disk. Do you want to reload it?</p>"
|
popupText = ("<p>The file <i>%s</i> has been changed on disk. Do you want to reload it?</p>"
|
||||||
|
Reference in New Issue
Block a user