source: sasview/src/sas/qtgui/UnitTesting/SquishTestSuites/suite_sasview_calculators/tst_Density_Calculator/test.js @ d6b234b

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

Cleanup after merge (removed sasview/sasview)

  • Property mode set to 100755
File size: 2.2 KB
Line 
1function main() {
2    startApplication("sasview");
3    activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool"));
4    activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "Density/Volume Calculator"));
5    test.compare(waitForObjectExists(":DensityPanel.editMolecularFormula_QLineEdit").visible, true);
6    test.compare(waitForObjectExists(":DensityPanel.editMolecularFormula_QLineEdit").text, "H2O");
7    test.compare(waitForObjectExists(":DensityPanel.editMolecularFormula_QLineEdit").displayText, "H2O");
8    test.compare(waitForObjectExists(":DensityPanel.editMolarMass_QLineEdit").text, "18.0153");
9    test.compare(waitForObjectExists(":DensityPanel.editMolarMass_QLineEdit").enabled, true);
10    test.compare(waitForObjectExists(":DensityPanel.editMolarVolume_QLineEdit").visible, true);
11    test.compare(waitForObjectExists(":DensityPanel.editMolarVolume_QLineEdit").text, "");
12    test.compare(waitForObjectExists(":DensityPanel.editMassDensity_QLineEdit").text, "");
13    test.compare(waitForObjectExists(":DensityPanel.editMassDensity_QLineEdit").visible, true);
14    type(waitForObject(":DensityPanel.editMolecularFormula_QLineEdit"), "2");
15    type(waitForObject(":DensityPanel.editMolecularFormula_QLineEdit"), "<Tab>");
16    type(waitForObject(":DensityPanel.editMolarMass_QLineEdit"), "<Tab>");
17    type(waitForObject(":DensityPanel.editMolarVolume_QLineEdit"), "35");
18    type(waitForObject(":DensityPanel.editMolarVolume_QLineEdit"), "<Tab>");
19    test.compare(waitForObjectExists(":DensityPanel.editMolarMass_QLineEdit").text, "34.0147");
20    test.compare(waitForObjectExists(":DensityPanel.editMassDensity_QLineEdit").text, "0.971848571429");
21    clickButton(waitForObject(":DensityPanel.Reset_QPushButton"));
22    test.compare(waitForObjectExists(":DensityPanel.editMolecularFormula_QLineEdit").text, "H2O");
23    test.compare(waitForObjectExists(":DensityPanel.editMolarMass_QLineEdit").text, "18.0153");
24    test.compare(waitForObjectExists(":DensityPanel.editMolarVolume_QLineEdit").text, "");
25    test.compare(waitForObjectExists(":DensityPanel.editMassDensity_QLineEdit").text, "");
26    clickButton(waitForObject(":DensityPanel.Close_QPushButton"));
27}
Note: See TracBrowser for help on using the repository browser.