Commit 3b820cc9 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix tst_installed_languages on OSX

Change-Id: I470047d663ec4c2bfebaa17baf67bc811d9c0c65
Reviewed-by: default avatarRobert Loehning <robert.loehning@qt.io>
parent b2f869c4
...@@ -42,6 +42,8 @@ def main(): ...@@ -42,6 +42,8 @@ def main():
selectFromCombo(":User Interface.languageBox_QComboBox", languageName) selectFromCombo(":User Interface.languageBox_QComboBox", languageName)
clickButton(waitForObject(":Options.OK_QPushButton")) clickButton(waitForObject(":Options.OK_QPushButton"))
clickButton(waitForObject(":Restart required.OK_QPushButton")) clickButton(waitForObject(":Restart required.OK_QPushButton"))
test.verify(waitFor("not object.exists(':Options_Core::Internal::SettingsDialog')", 5000),
"Options dialog disappeared")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
waitForCleanShutdown() waitForCleanShutdown()
snooze(4) # wait for complete unloading of Creator snooze(4) # wait for complete unloading of Creator
...@@ -49,16 +51,20 @@ def main(): ...@@ -49,16 +51,20 @@ def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
try: try:
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
# temporary hack for handling wrong menus when using Squish 5.0.1 with Qt5.2 try:
fileMenu = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", fileMenu = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar",
testData.field(lang, "File")) testData.field(lang, "File"))
activateItem(fileMenu) activateItem(fileMenu)
waitForObject("{type='QMenu' visible='1'}") obj = waitForObject("{type='QMenu' visible='1'}")
activateItem(fileMenu) test.compare(str(obj.objectName), 'QtCreator.Menu.File',
"Creator was running in %s translation" % languageName)
activateItem(fileMenu)
except:
test.fail("Creator seems to be missing %s translation" % languageName)
nativeType("<Command+q>") nativeType("<Command+q>")
else: else:
invokeMenuItem(testData.field(lang, "File"), testData.field(lang, "Exit")) invokeMenuItem(testData.field(lang, "File"), testData.field(lang, "Exit"))
test.passes("Creator was running in %s translation." % languageName) test.passes("Creator was running in %s translation." % languageName)
except: except:
test.fail("Creator seems to be missing %s translation" % languageName) test.fail("Creator seems to be missing %s translation" % languageName)
sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow") sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment