2 source(findFile("scripts", "common.py"))
4 startApplication("linux_run.sh")
7 #[step] Create parameter 'a = 100'
8 parameter_create("a", "100")
10 #[step] Create sketch with line (0,0) - (a, 0)
11 sketch_create(help_points("XY_plane"), lambda: line_create((0, 0), ("a", 0)))
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)
20 activateItem(waitForObjectItem(":_QMenu", "Delete"))
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?")
26 #[step] Click 'Yes' and close application
27 clickButton(waitForObject(":Delete features.Yes_QPushButton"))