]> SALOME platform Git repositories - modules/shaper.git/blob - test.squish/suite_ISSUES/tst_818/test.py
Salome HOME
9268a5f401a945f27aed021eab84d37f98851994
[modules/shaper.git] / test.squish / suite_ISSUES / tst_818 / test.py
1 def main():
2     source(findFile("scripts", "common.py"))
3     
4     startApplication("linux_run.sh")
5     set_defaults()
6     
7     #[step] Create parameter 'a = 100'
8     parameter_create("a", "100")
9     
10     #[step] Create sketch with line (0,0) - (a, 0)
11     sketch_create(help_points("XY_plane"), lambda: line_create((0, 0), ("a", 0)))
12
13     #[step] Activate context menu for parameter 'a' and click 'Delete'
14     waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1)")
15     clickItem(":Object browser_XGUI_DataTree", "Parameters (1)", -10, 10, 0, Qt.LeftButton)
16     waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).a = 100")
17     clickItem(":Object browser_XGUI_DataTree", "Parameters (1).a = 100", 10, 10, 0, Qt.LeftButton)
18     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 100", 10, 10, 0)
19     
20     activateItem(waitForObjectItem(":_QMenu", "Delete"))
21     
22     #[check] Message box with "Selected features are used in the following features: SketchLine_1. These features will be deleted.\nAlso these features will be deleted: Sketch_1.\nWould you like to continue?" should appear
23     waitFor("object.exists(':Delete features.Label_QLabel')", 20000)
24     test.compare(str(findObject(":Delete features.Label_QLabel").text), "Selected features are used in the following features: SketchLine_1. These features will be deleted.\nAlso these features will be deleted: Sketch_1.\nWould you like to continue?")
25
26     #[step] Click 'Yes' and close application
27     clickButton(waitForObject(":Delete features.Yes_QPushButton"))