source: sasview/sasview/squish_test_suites/suite_sasview_qt/tst_Resolution/test.py @ 9c39b317

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since 9c39b317 was 9c39b317, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

SASVIEW-633: initial test suite for Squish functionality testing

  • Property mode set to 100755
File size: 3.4 KB
Line 
1# -*- coding: utf-8 -*-
2
3def 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)
Note: See TracBrowser for help on using the repository browser.