4 source(findFile("scripts", "common.py"))
6 startApplication("linux_run.sh")
9 #[step] Create parameter 'a = 100'
10 parameter_create("a", "100")
12 #[step] Create sketch with line (0,0) - (a, 0)
13 sketch_create(help_points("XY_plane"), lambda: line_create((0, 0), ("a", 0)))
15 #[step] Activate context menu for parameter 'a' and click 'Delete'
16 waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1)")
17 clickItem(":Object browser_XGUI_DataTree", "Parameters (1)", -10, 10, 0, Qt.LeftButton)
18 waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).a = 100")
19 clickItem(":Object browser_XGUI_DataTree", "Parameters (1).a = 100", 10, 10, 0, Qt.LeftButton)
20 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 100", 10, 10, 0)
22 activateItem(waitForObjectItem(":_QMenu", "Delete"))
24 #[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
25 waitFor("object.exists(':Delete features.Label_QLabel')", 20000)
27 an_expected = """Selected parameters are used in the following features: SketchLine_1.
28 These features will be deleted.
29 (Also these features will be deleted: Sketch_1)
30 Or parameters could be replaced by their values.
31 Would you like to continue?"""
32 test.compare(str(findObject(":Delete features.Label_QLabel").text), an_expected)
34 #[step] Click 'Yes' and close application
35 clickButton(waitForObject(":Delete features.Yes_QPushButton"))