[7d97e2d] | 1 | function main() { |
---|
| 2 | startApplication("sasview"); |
---|
| 3 | activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Tool")); |
---|
| 4 | activateItem(waitForObjectItem(":MainWindow.menuTool_QMenu", "SLD Calculator")); |
---|
| 5 | test.compare(waitForObjectExists(":SldPanel_SldPanel").windowTitle, "SLD Calculator"); |
---|
| 6 | test.compare(waitForObjectExists(":SldPanel_SldPanel").visible, true); |
---|
| 7 | test.compare(waitForObjectExists(":groupBoxInput.editMolecularFormula_QLineEdit").displayText, "H2O"); |
---|
| 8 | test.compare(waitForObjectExists(":groupBoxInput.editMolecularFormula_QLineEdit").readOnly, false); |
---|
| 9 | test.compare(waitForObjectExists(":groupBoxInput.editMolecularFormula_QLineEdit").enabled, true); |
---|
| 10 | test.compare(waitForObjectExists(":groupBoxInput.editMassDensity_QLineEdit").text, "1"); |
---|
| 11 | test.compare(waitForObjectExists(":groupBoxInput.editWavelength_QLineEdit").text, "6"); |
---|
| 12 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronSldReal_QLineEdit").text, "-5.61e-07"); |
---|
| 13 | test.compare(waitForObjectExists(":groupBoxOutput.editCuKaSldReal_QLineEdit").text, "9.47e-06"); |
---|
| 14 | test.compare(waitForObjectExists(":groupBoxOutput.editMoKaSldReal_QLineEdit").text, "9.43e-06"); |
---|
| 15 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronIncXs_QLineEdit").text, "5.37"); |
---|
| 16 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronAbsXs_QLineEdit").text, "0.0742"); |
---|
| 17 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronLength_QLineEdit").text, "0.175"); |
---|
| 18 | type(waitForObject(":groupBoxInput.editMolecularFormula_QLineEdit"), "2"); |
---|
| 19 | type(waitForObject(":groupBoxInput.editMolecularFormula_QLineEdit"), "<Tab>"); |
---|
| 20 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronSldReal_QLineEdit").text, "7.31e-07"); |
---|
| 21 | test.compare(waitForObjectExists(":groupBoxOutput.editCuKaSldReal_QLineEdit").text, "9.03e-06"); |
---|
| 22 | test.compare(waitForObjectExists(":groupBoxOutput.editMoKaSldReal_QLineEdit").text, "8.99e-06"); |
---|
| 23 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronIncXs_QLineEdit").text, "2.84"); |
---|
| 24 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronAbsXs_QLineEdit").text, "0.0393"); |
---|
| 25 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronLength_QLineEdit").text, "0.323"); |
---|
| 26 | type(waitForObject(":groupBoxInput.editMassDensity_QLineEdit"), "5"); |
---|
| 27 | type(waitForObject(":groupBoxInput.editMassDensity_QLineEdit"), "<Tab>"); |
---|
| 28 | type(waitForObject(":groupBoxInput.editWavelength_QLineEdit"), "10"); |
---|
| 29 | type(waitForObject(":groupBoxInput.editWavelength_QLineEdit"), "<Tab>"); |
---|
| 30 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronSldReal_QLineEdit").text, "3.65e-06"); |
---|
| 31 | test.compare(waitForObjectExists(":groupBoxOutput.editCuKaSldReal_QLineEdit").text, "4.52e-05"); |
---|
| 32 | test.compare(waitForObjectExists(":groupBoxOutput.editMoKaSldReal_QLineEdit").text, "4.5e-05"); |
---|
| 33 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronIncXs_QLineEdit").text, "14.2"); |
---|
| 34 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronAbsXs_QLineEdit").text, "0.328"); |
---|
| 35 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronLength_QLineEdit").text, "0.0641"); |
---|
| 36 | clickButton(waitForObject(":SldPanel.Reset_QPushButton")); |
---|
| 37 | test.compare(waitForObjectExists(":groupBoxInput.editMolecularFormula_QLineEdit").text, "H2O"); |
---|
| 38 | test.compare(waitForObjectExists(":groupBoxInput.editMassDensity_QLineEdit").text, "1"); |
---|
| 39 | test.compare(waitForObjectExists(":groupBoxInput.editWavelength_QLineEdit").text, "6"); |
---|
| 40 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronSldReal_QLineEdit").text, "-5.61e-07"); |
---|
| 41 | test.compare(waitForObjectExists(":groupBoxOutput.editNeutronIncXs_QLineEdit").text, "5.37"); |
---|
| 42 | sendEvent("QWheelEvent", waitForObject(":SldPanel_SldPanel"), -1835, 357, 120, 0, 2); |
---|
| 43 | sendEvent("QWheelEvent", waitForObject(":SldPanel_SldPanel"), -1456, 356, -120, 0, 2); |
---|
| 44 | clickButton(waitForObject(":SldPanel.Close_QPushButton")); |
---|
| 45 | } |
---|