--- /dev/null
+../../../shared/scripts/common.py
\ No newline at end of file
--- /dev/null
+AUT=salome_run.sh
+CWD=<AUT_path>
+ENVVARS=envvars
+HOOK_SUB_PROCESSES=true
+IMPLICITAUTSTART=0
+LANGUAGE=Python
+OBJECTMAP=../objects_salome.map
+TEST_CASES=tst_BASE
+VERSION=3
+WRAPPERS=Qt
--- /dev/null
+#[tested functionality] 1. Add parameter 2. Use wrong parameter name 3. Error notification in header 3. Error notification in widget
+
+def main():
+ source(findFile("scripts", "common.py"))
+
+ startApplication("salome_run.sh")
+
+ activate_newgeom()
+
+ clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+ type(waitForObject(":Parameter_QLineEdit"), "a")
+ type(waitForObject(":Parameter_ExpressionEditor"), "3")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ clickButton(waitForObject(":SALOME*.ConstructionPoint_QToolButton"))
+ type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+ type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "a")
+ waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+ test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate")
+
+ type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+ type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "b")
+
+ waitFor("object.exists(':Point_QFrame')", 20000)
+
+ test.compare(str(findObject(":Point_QFrame").toolTip), "ModelAPI_StateInvalidArgument")
+
+ waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+ test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate\nErrors:\nx - Model_AttributeValidator: name 'b' is not defined")
+
+ close_application()
--- /dev/null
+../../../shared/scripts/common.py
\ No newline at end of file
--- /dev/null
+AUT=salome_run.sh
+CWD=<AUT_path>
+ENVVARS=envvars
+HOOK_SUB_PROCESSES=true
+IMPLICITAUTSTART=0
+LANGUAGE=Python
+OBJECTMAP=../objects_salome.map
+TEST_CASES=tst_BASE
+VERSION=3
+WRAPPERS=Qt
--- /dev/null
+#[tested functionality] 1. Add parameter 2. Calculate parameter 3. Delete parameter
+
+def main():
+ source(findFile("scripts", "common.py"))
+
+ startApplication("salome_run.sh")
+
+ activate_newgeom()
+
+ #[step] Create parameter 'aa = 4'
+ activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
+ activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
+ type(waitForObject(":Parameter_QLineEdit"), "aa")
+ type(waitForObject(":Parameter_ExpressionEditor"), "4")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ # check the new parameter
+ waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
+
+ clickButton(waitForObject(":SALOME*.New part_QToolButton"))
+
+ activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
+ activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
+ type(waitForObject(":Parameter_QLineEdit"), "bb")
+ type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ # check the new parameter
+ waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
+
+ openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
+ activateItem(waitForObjectItem(":_QMenu", "Activate"))
+
+ openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
+ activateItem(waitForObjectItem(":_QMenu", "Delete"))
+ waitFor("object.exists(':Delete features._QLabel')", 20000)
+
+ an_expected = """Selected parameters are used in the following features: bb.
+These features will be deleted.
+Or parameters could be replaced by their values.
+Would you like to continue?"""
+ test.compare(str(findObject(":Delete features._QLabel").text), an_expected)
+ clickButton(waitForObject(":Delete features.No_QPushButton"))
+
+ # nothing is deleted
+ waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
+ waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
+
+ close_application()
--- /dev/null
+#[tested functionality] 1. Add parameter 2. Rename parameter
+
+def main():
+ source(findFile("scripts", "common.py"))
+
+ startApplication("salome_run.sh")
+
+ activate_newgeom()
+
+ clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+ type(waitForObject(":Parameter_QLineEdit"), "a")
+ type(waitForObject(":Parameter_ExpressionEditor"), "3")
+ clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+ openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 3", 10, 10, 0)
+ activateItem(waitForObjectItem(":_QMenu", "Rename"))
+ type(waitForObject(":_QExpandingLineEdit"), "b")
+ type(waitForObject(":_QExpandingLineEdit"), "<Return>")
+
+ test.compare(waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).b = 3").text, "b = 3")
+
+ openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).b = 3", 111, 5, 0)
+ activateItem(waitForObjectItem(":_QMenu", "Edit..."))
+ waitFor("object.exists(':Parameter_QLineEdit')", 20000)
+ test.compare(str(findObject(":Parameter_QLineEdit").text), "b")
+ waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
+ test.compare(str(findObject(":Parameter_ExpressionEditor").plainText), "3")
+
+ close_application()
+++ /dev/null
-def main():
- source(findFile("scripts", "common.py"))
-
- startApplication("salome_run.sh")
-
- activate_newgeom()
-
- #[step] Create parameter 'aa = 4'
- activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
- activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
- type(waitForObject(":Parameter_QLineEdit"), "aa")
- type(waitForObject(":Parameter_ExpressionEditor"), "4")
- clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
- # check the new parameter
- waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
-
- clickButton(waitForObject(":SALOME*.New part_QToolButton"))
-
- activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
- activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
- type(waitForObject(":Parameter_QLineEdit"), "bb")
- type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
- clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
- # check the new parameter
- waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
-
- openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
- activateItem(waitForObjectItem(":_QMenu", "Activate"))
-
- openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
- activateItem(waitForObjectItem(":_QMenu", "Delete"))
- waitFor("object.exists(':Delete features._QLabel')", 20000)
-
- an_expected = """Selected parameters are used in the following features: bb.
-These features will be deleted.
-Or parameters could be replaced by their values.
-Would you like to continue?"""
- test.compare(str(findObject(":Delete features._QLabel").text), an_expected)
- clickButton(waitForObject(":Delete features.No_QPushButton"))
-
- # nothing is deleted
- waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
- waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
-
- close_application()
+++ /dev/null
-def main():
- source(findFile("scripts", "common.py"))
-
- startApplication("salome_run.sh")
-
- activate_newgeom()
-
- clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
- type(waitForObject(":Parameter_QLineEdit"), "a")
- type(waitForObject(":Parameter_ExpressionEditor"), "3")
- clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
- openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 3", 10, 10, 0)
- activateItem(waitForObjectItem(":_QMenu", "Rename"))
- type(waitForObject(":_QExpandingLineEdit"), "b")
- type(waitForObject(":_QExpandingLineEdit"), "<Return>")
-
- test.compare(waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).b = 3").text, "b = 3")
-
- openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).b = 3", 111, 5, 0)
- activateItem(waitForObjectItem(":_QMenu", "Edit..."))
- waitFor("object.exists(':Parameter_QLineEdit')", 20000)
- test.compare(str(findObject(":Parameter_QLineEdit").text), "b")
- waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
- test.compare(str(findObject(":Parameter_ExpressionEditor").plainText), "3")
-
- close_application()
+++ /dev/null
-def main():
- source(findFile("scripts", "common.py"))
-
- startApplication("salome_run.sh")
-
- activate_newgeom()
-
- clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
- type(waitForObject(":Parameter_QLineEdit"), "a")
- type(waitForObject(":Parameter_ExpressionEditor"), "3")
- clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
- clickButton(waitForObject(":SALOME*.ConstructionPoint_QToolButton"))
- type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
- type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "a")
- waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
- test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate")
-
- type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
- type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "b")
-
- waitFor("object.exists(':Point_QFrame')", 20000)
-
- test.compare(str(findObject(":Point_QFrame").toolTip), "x - Model_AttributeValidator: name 'b' is not defined")
- waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
- test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate\nErrors:\nx - Model_AttributeValidator: name 'b' is not defined")
-
- close_application()
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 531, 537, 0, Qt.LeftButton)
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 241, 169, 0, Qt.LeftButton)
clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
-
+
+ test.vp("VP_SKETCH")
+
clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
-# mouseDrag(waitForObject(":Features_QScrollArea"), 31, 1, -2, -2, 1, Qt.LeftButton)
clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 216, 270, 0, Qt.LeftButton)
clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
+ test.vp("VP_EXTRUSION")
+
clickButton(waitForObject(":Extrusion.ExtrusionFuse_AppElements_Button"))
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 290, 316, 0, Qt.LeftButton)
+ clickButton(waitForObject(":OpenParts*.Fit all_QToolButton"))
+ test.vp("VP_EXTRUSIONFUSE")
+
mouseClick(waitForObject(":Sketch.Basic_AppElements_MenuGroupPanel"), 143, 56, 0, Qt.LeftButton)
clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 259, 248, 0, Qt.LeftButton)
TESTCASES="${TESTCASES} --testcase tst_RADIUS"
squishrunner-run suite_STANDALONE "${TESTCASES}"
+TESTCASES=""
+TESTCASES="${TESTCASES} --testcase tst_679"
+squishrunner-run suite_ERROR_NOTIFICATION "${TESTCASES}"
+
TESTCASES=""
TESTCASES="${TESTCASES} --testcase tst_474"
+TESTCASES="${TESTCASES} --testcase tst_576"
+squishrunner-run suite_FEATURE_PARAMETERS "${TESTCASES}"
+
+TESTCASES=""
#TESTCASES="${TESTCASES} --testcase tst_532"
-#TESTCASES="${TESTCASES} --testcase tst_576"
-#TESTCASES="${TESTCASES} --testcase tst_679"
#TESTCASES="${TESTCASES} --testcase tst_903"
-squishrunner-run suite_ISSUES_SALOME "${TESTCASES}"
+#squishrunner-run suite_ISSUES_SALOME "${TESTCASES}"
TESTCASES=""
#TESTCASES="${TESTCASES} --testcase tst_boolean_001"