[9c39b317] | 1 | # -*- coding: utf-8 -*- |
---|
| 2 | |
---|
| 3 | def main(): |
---|
| 4 | startApplication("sasview") |
---|
| 5 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox"), 79, 12, 0, Qt.LeftButton) |
---|
| 6 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox", "Cylinder"), 70, 7, 0, Qt.LeftButton) |
---|
| 7 | snooze(1) |
---|
| 8 | # Change category to Cylinder |
---|
| 9 | test.compare(str(waitForObjectExists(":groupBox_6.cbModel_QComboBox").currentText), "barbell") |
---|
| 10 | snooze(1) |
---|
| 11 | test.compare(waitForObjectExists(":lstParams.sld_solvent_QModelIndex").text, "sld_solvent") |
---|
| 12 | test.compare(waitForObjectExists(":groupBox_6.cbStructureFactor_QComboBox").enabled, False) |
---|
| 13 | #mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox"), 98, 6, 0, Qt.LeftButton) |
---|
| 14 | |
---|
| 15 | test.compare(waitForObjectExists(":groupBox_7.chkPolydispersity_QCheckBox").enabled, True) |
---|
| 16 | test.compare(waitForObjectExists(":groupBox_7.chkPolydispersity_QCheckBox").checked, False) |
---|
| 17 | test.compare(waitForObjectExists(":groupBox_7.chk2DView_QCheckBox").enabled, True) |
---|
| 18 | test.compare(waitForObjectExists(":groupBox_7.chk2DView_QCheckBox").checked, False) |
---|
| 19 | test.compare(waitForObjectExists(":groupBox_7.chkMagnetism_QCheckBox").enabled, False) |
---|
| 20 | test.compare(waitForObjectExists(":groupBox_7.chkMagnetism_QCheckBox").checked, False) |
---|
| 21 | |
---|
| 22 | test.compare(str(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel").text), "---") |
---|
| 23 | test.compare(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel").visible, True) |
---|
| 24 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdPlot_QPushButton_2").enabled, True) |
---|
| 25 | test.compare(str(waitForObjectExists(":FittingWidgetUI.cmdPlot_QPushButton_2").text), "Calculate") |
---|
| 26 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").enabled, False) |
---|
| 27 | test.compare(str(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").text), "Fit") |
---|
| 28 | test.compare(str(waitForObjectExists(":FittingWidgetUI.cmdHelp_QPushButton").text), "Help") |
---|
| 29 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdHelp_QPushButton").enabled, True) |
---|
| 30 | test.compare(waitForObjectExists(":FittingWidgetUI.label_QLabel_2").visible, True) |
---|
| 31 | test.compare(str(waitForObjectExists(":FittingWidgetUI.label_QLabel_2").text), "No data loaded") |
---|
| 32 | test.compare(waitForObjectExists(":FittingWidgetUI.label_QLabel_2").enabled, True) |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "radius") |
---|
| 36 | clickItem(":groupBox_6.lstParams_QTreeView_4", "radius", -10, 8, 0, Qt.LeftButton) |
---|
| 37 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "radius.Polydispersity") |
---|
| 38 | clickItem(":groupBox_6.lstParams_QTreeView_4", "radius.Polydispersity", -7, 11, 0, Qt.LeftButton) |
---|
| 39 | |
---|
| 40 | test.compare(waitForObjectExists(":Polydispersity.0_QModelIndex").text, "0") |
---|
| 41 | test.compare(waitForObjectExists(":Polydispersity.0_QModelIndex").enabled, True) |
---|
| 42 | test.compare(waitForObjectExists(":Polydispersity.gaussian_QModelIndex_2").text, "gaussian") |
---|
| 43 | test.compare(str(waitForObjectExists(":groupBox_8.lblMinRangeDef_QLabel").text), "0.005") |
---|
| 44 | test.compare(waitForObjectExists(":groupBox_8.lblMinRangeDef_QLabel").visible, True) |
---|
| 45 | test.compare(waitForObjectExists(":groupBox_8.lblMaxRangeDef_QLabel").visible, True) |
---|
| 46 | test.compare(str(waitForObjectExists(":groupBox_8.lblMaxRangeDef_QLabel").text), "0.1") |
---|
| 47 | test.compare(str(waitForObjectExists(":groupBox_8.lblCurrentSmearing_QLabel").text), "None") |
---|
| 48 | test.compare(waitForObjectExists(":groupBox_8.lblCurrentSmearing_QLabel").visible, True) |
---|