source: sasview/sasview/squish_test_suites/suite_sasview_calculators/tst_SlitSize_Calculator/test.js @ 7d97e2d

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 7d97e2d was 7d97e2d, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

Squish test suite for the calculators SASVIEW-698

  • Property mode set to 100755
File size: 2.4 KB
Line 
1function main() {
2    startApplication("sasview");
3    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"));
4    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Slit Size Calculator"));
5    test.compare(waitForObjectExists(":groupBox.data_file_QLineEdit").text, "");
6    test.compare(waitForObjectExists(":groupBox_2.slit_length_out_QLineEdit").text, "");
7    clickButton(waitForObject(":SlitSizeCalculator.browseButton_QPushButton"));
8    waitForObjectItem(":stackedWidget.listView_QListView", "test");
9    doubleClickItem(":stackedWidget.listView_QListView", "test", 28, 5, 0, Qt.LeftButton);
10    waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data");
11    doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 24, 7, 0, Qt.LeftButton);
12    waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt");
13    doubleClickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 62, 13, 0, Qt.LeftButton);
14    test.compare(waitForObjectExists(":groupBox.data_file_QLineEdit").text, "cyl_400_20.txt");
15    test.compare(waitForObjectExists(":groupBox_2.slit_length_out_QLineEdit").text, "0.10238");
16    clickButton(waitForObject(":SlitSizeCalculator.browseButton_QPushButton"));
17    clickButton(waitForObject(":QFileDialog.toParentButton_QToolButton"));
18    waitForObjectItem(":stackedWidget.listView_QListView", "2d\\_data");
19    doubleClickItem(":stackedWidget.listView_QListView", "2d\\_data", 31, 5, 0, Qt.LeftButton);
20    waitForObjectItem(":stackedWidget.listView_QListView", "P123\\_D2O\\_40\\_percent\\.dat");
21    doubleClickItem(":stackedWidget.listView_QListView", "P123\\_D2O\\_40\\_percent\\.dat", 75, 14, 0, Qt.LeftButton);
22    sendEvent("QWheelEvent", waitForObject(":MainWindow.Welcome to SasView_QLabel"), 756, 5, -120, 0, 2);
23    sendEvent("QWheelEvent", waitForObject(":MainWindow.Welcome to SasView_QLabel"), 756, 5, -120, 0, 2);
24    test.compare(waitForObjectExists(":groupBox.data_file_QLineEdit").text, "P123_D2O_40_percent.dat");
25    test.compare(waitForObjectExists(":groupBox_2.slit_length_out_QLineEdit").text, "ERROR!");
26    test.compare(waitForObjectExists(":SlitSizeCalculator.browseButton_QPushButton").toolTip, "<html><head/><body><p>Compute the thickness or diameter.</p></body></html>");
27    clickButton(waitForObject(":SlitSizeCalculator.closeButton_QPushButton"));
28}
Note: See TracBrowser for help on using the repository browser.