[9c39b317] | 1 | # -*- coding: utf-8 -*- |
---|
| 2 | |
---|
| 3 | def main(): |
---|
| 4 | startApplication("sasview") |
---|
| 5 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Resolution") |
---|
| 6 | test.compare(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentIndex, 0) |
---|
| 7 | test.compare(str(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentText), "None") |
---|
| 8 | test.compare(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").count, 1) |
---|
| 9 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Model") |
---|
| 10 | clickButton(waitForObject(":groupBox.cmdLoad_QPushButton")) |
---|
| 11 | waitForObjectItem(":stackedWidget.listView_QListView", "test") |
---|
| 12 | doubleClickItem(":stackedWidget.listView_QListView", "test", 36, 4, 0, Qt.LeftButton) |
---|
| 13 | waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data") |
---|
| 14 | doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 30, 10, 0, Qt.LeftButton) |
---|
| 15 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt") |
---|
| 16 | doubleClickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 72, 3, 0, Qt.LeftButton) |
---|
| 17 | clickButton(waitForObject(":groupBox.cmdSendTo_QPushButton")) |
---|
| 18 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 136, 8, 0, Qt.LeftButton) |
---|
| 19 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Cylinder"), 129, 9, 0, Qt.LeftButton) |
---|
| 20 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Resolution") |
---|
| 21 | test.compare(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentIndex, 0) |
---|
| 22 | test.compare(str(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentText), "None") |
---|
| 23 | test.compare(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").count, 3) |
---|
| 24 | mouseClick(waitForObject(":groupBox_4.cbSmearing_QComboBox"), 117, 7, 0, Qt.LeftButton) |
---|
| 25 | mouseClick(waitForObjectItem(":groupBox_4.cbSmearing_QComboBox", "Custom Pinhole Smear"), 113, 6, 0, Qt.LeftButton) |
---|
| 26 | test.compare(str(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentText), "Custom Pinhole Smear") |
---|
| 27 | test.compare(str(waitForObjectExists(":groupBox_4.lblSmearUp_QLabel").text), "<html><head/><body><p>dQ<span style=\" vertical-align:sub;\">low</span></p></body></html>") |
---|
| 28 | test.compare(str(waitForObjectExists(":groupBox_4.lblSmearDown_QLabel").text), "<html><head/><body><p>dQ<span style=\" vertical-align:sub;\">high</span></p></body></html>") |
---|
| 29 | test.compare(str(waitForObjectExists(":groupBox_4.txtSmearUp_QLineEdit").text), "") |
---|
| 30 | test.compare(waitForObjectExists(":groupBox_4.txtSmearUp_QLineEdit").enabled, True) |
---|
| 31 | test.compare(str(waitForObjectExists(":groupBox_4.txtSmearDown_QLineEdit").text), "") |
---|
| 32 | test.compare(waitForObjectExists(":groupBox_4.txtSmearDown_QLineEdit").enabled, True) |
---|
| 33 | mouseClick(waitForObject(":groupBox_4.cbSmearing_QComboBox"), 117, 15, 0, Qt.LeftButton) |
---|
| 34 | mouseClick(waitForObjectItem(":groupBox_4.cbSmearing_QComboBox", "Custom Slit Smear"), 89, 5, 0, Qt.LeftButton) |
---|
| 35 | test.compare(str(waitForObjectExists(":groupBox_4.cbSmearing_QComboBox").currentText), "Custom Slit Smear") |
---|
| 36 | test.compare(waitForObjectExists(":groupBox_4.lblSmearUp_QLabel").visible, True) |
---|
| 37 | test.compare(str(waitForObjectExists(":groupBox_4.lblSmearUp_QLabel").text), "Slit height") |
---|
| 38 | test.compare(str(waitForObjectExists(":groupBox_4.lblSmearDown_QLabel").text), "Slit width") |
---|
| 39 | test.compare(waitForObjectExists(":groupBox_4.lblSmearDown_QLabel").visible, True) |
---|