source: sasview/src/sas/qtgui/UnitTesting/SquishTestSuites/suite_sasview_qt/tst_Menu_Tools/test.py

ESS_GUI
Last change on this file was d6b234b, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

Cleanup after merge (removed sasview/sasview)

  • Property mode set to 100755
File size: 3.1 KB
Line 
1# -*- coding: utf-8 -*-
2
3def main():
4    startApplication("sasview")
5    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
6    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "SLD Calculator"))
7    test.compare(waitForObjectExists(":SldPanel_SldPanel").enabled, True)
8    test.compare(str(waitForObjectExists(":SldPanel_SldPanel").windowTitle), "SLD Calculator")
9    test.compare(waitForObjectExists(":SldPanel_SldPanel").visible, True)
10    clickButton(waitForObject(":SldPanel.Close_QPushButton"))
11    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
12    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Density/Volume Calculator"))
13    test.compare(waitForObjectExists(":DensityPanel_DensityPanel").visible, True)
14    test.compare(str(waitForObjectExists(":DensityPanel_DensityPanel").windowTitle), "Density/Volume Calculator")
15    test.compare(waitForObjectExists(":DensityPanel_DensityPanel").enabled, True)
16    clickButton(waitForObject(":DensityPanel.Close_QPushButton"))
17    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
18    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Slit Size Calculator"))
19    test.compare(str(waitForObjectExists(":SlitSizeCalculator_SlitSizeCalculator").windowTitle), "Slit Size Calculator")
20    test.compare(waitForObjectExists(":SlitSizeCalculator_SlitSizeCalculator").visible, True)
21    test.compare(waitForObjectExists(":SlitSizeCalculator_SlitSizeCalculator").enabled, True)
22    clickButton(waitForObject(":SlitSizeCalculator.closeButton_QPushButton"))
23    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
24    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Kiessig Thickness Calculator"))
25    test.compare(str(waitForObjectExists(":KiessigPanel_KiessigPanel").windowTitle), "Kiessig Thickness Calculator")
26    test.compare(waitForObjectExists(":KiessigPanel_KiessigPanel").enabled, True)
27    test.compare(waitForObjectExists(":KiessigPanel_KiessigPanel").visible, True)
28    clickButton(waitForObject(":KiessigPanel.closeButton_QPushButton"))
29    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
30    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Generic Scattering Calculator"))
31    test.compare(waitForObjectExists(":GenericScatteringCalculator_GenericScatteringCalculator").enabled, True)
32    test.compare(str(waitForObjectExists(":GenericScatteringCalculator_GenericScatteringCalculator").windowTitle), "Generic SAS Calculator")
33    test.compare(waitForObjectExists(":GenericScatteringCalculator_GenericScatteringCalculator").visible, True)
34    clickButton(waitForObject(":GenericScatteringCalculator.cmdClose_QPushButton"))
35    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"))
36    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Python Shell/Editor"))
37    test.compare(waitForObjectExists(":MainWindow.IPythonDockWidget_QDockWidget").visible, True)
38    test.compare(str(waitForObjectExists(":MainWindow.IPythonDockWidget_QDockWidget").windowTitle), "IPython")
39    test.compare(waitForObjectExists(":MainWindow.IPythonDockWidget_QDockWidget").enabled, True)
Note: See TracBrowser for help on using the repository browser.