source: sasview/src/sas/qtgui/UnitTesting/SquishTestSuites/suite_sasview_qt/tst_Fitting1D/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.8 KB
Line 
1# -*- coding: utf-8 -*-
2
3def main():
4    startApplication("sasview")
5    clickButton(waitForObject(":groupBox.cmdLoad_QPushButton"))
6    waitForObjectItem(":stackedWidget.listView_QListView", "test")
7    doubleClickItem(":stackedWidget.listView_QListView", "test", 38, 7, 0, Qt.LeftButton)
8    waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data")
9    doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 40, 7, 0, Qt.LeftButton)
10    waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt")
11    doubleClickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 94, 5, 0, Qt.LeftButton)
12    clickButton(waitForObject(":groupBox.cmdSendTo_QPushButton"))
13    mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 162, 13, 0, Qt.LeftButton)
14    mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Cylinder"), 143, 10, 0, Qt.LeftButton)
15    waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "length")
16    clickItem(":groupBox_6.lstParams_QTreeView_4", "length", 12, 12, 0, Qt.LeftButton)
17    waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "radius")
18    clickItem(":groupBox_6.lstParams_QTreeView_4", "radius", 12, 9, 0, Qt.LeftButton)
19    waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "radius\\_bell")
20    clickItem(":groupBox_6.lstParams_QTreeView_4", "radius\\_bell", 14, 11, 0, Qt.LeftButton)
21    clickButton(waitForObject(":FittingWidgetUI.cmdFit_QPushButton"))
22    snooze(6)
23    test.compare(waitForObjectExists(":lstParams.26.223_QModelIndex").text, "26.223")
24    test.compare(waitForObjectExists(":lstParams.26.223_QModelIndex").row, 4)
25    test.compare(waitForObjectExists(":lstParams.26.223_QModelIndex").column, 1)
26    test.compare(waitForObjectExists(":lstParams.19.45_QModelIndex").column, 1)
27    test.compare(waitForObjectExists(":lstParams.19.45_QModelIndex").text, "19.45")
28    test.compare(waitForObjectExists(":lstParams.19.45_QModelIndex").row, 5)
29    test.compare(waitForObjectExists(":lstParams.883.92_QModelIndex").text, "883.92")
30    test.compare(waitForObjectExists(":lstParams.883.92_QModelIndex").column, 1)
31    test.compare(waitForObjectExists(":lstParams.883.92_QModelIndex").row, 6)
32    test.compare(waitForObjectExists(":Error_HeaderViewItem").visualIndex, 2)
33    test.compare(waitForObjectExists(":Error_HeaderViewItem").text, "Error")
34    test.compare(str(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel_2").text), "0.00035705")
35    test.compare(str(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar_2").windowTitle), "Graph1")
36    test.compare(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar_2").visible, True)
37    test.compare(waitForObjectExists(":qt_workspacechild.Graph3_QWorkspaceTitleBar_4").visible, True)
38    test.compare(str(waitForObjectExists(":qt_workspacechild.Graph3_QWorkspaceTitleBar_4").windowTitle), "Graph3")
39    test.compare(str(waitForObjectExists(":qt_workspacechild.Graph2_QWorkspaceTitleBar_2").windowTitle), "Graph2")
40    test.compare(waitForObjectExists(":qt_workspacechild.Graph2_QWorkspaceTitleBar_2").visible, True)
41    waitForObjectItem(":groupBox.treeView_QTreeView", "cyl\\_400\\_20\\.txt")
42    clickItem(":groupBox.treeView_QTreeView", "cyl\\_400\\_20\\.txt", -8, 9, 0, Qt.LeftButton)
43    test.compare(waitForObjectExists(":cyl_400_20.txt.barbell [cyl_400_20.txt]_QModelIndex").text, "barbell [cyl_400_20.txt]")
44    test.compare(waitForObjectExists(":cyl_400_20.txt.barbell [cyl_400_20.txt]_QModelIndex").checkState, "checked")
45    test.compare(waitForObjectExists(":cyl_400_20.txt.Residuals for barbell[cyl_400_20.txt]_QModelIndex").checkState, "checked")
46    test.compare(waitForObjectExists(":cyl_400_20.txt.Residuals for barbell[cyl_400_20.txt]_QModelIndex").text, "Residuals for barbell[cyl_400_20.txt]")
47    test.compare(waitForObjectExists(":cyl_400_20.txt.Residuals for barbell[cyl_400_20.txt]_QModelIndex").enabled, True)
Note: See TracBrowser for help on using the repository browser.