5 #[Topic] Parallel lines
6 #[Tested functionality] 'Parallel' constraint
11 source(findFile("scripts", "common.py"))
13 #[section] Application start
15 startApplication("salome_run.sh")
19 #[step] Open 'for_sketch_006.hdf'
20 open(DATA_PATH + "/for_sketch_006.hdf")
22 #[step] Activate NewGeom
23 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
25 #[step] Activate Part_1
26 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
27 clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 51, 7, 0, Qt.LeftButton)
28 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 51, 7, 0)
29 activateItem(waitForObjectItem(":_QMenu", "Activate"))
32 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1")
33 clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1", 54, 11, 0, Qt.LeftButton)
34 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Sketch\\_1", 54, 11, 0)
35 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
37 #[step] Click '+OZ' view button
38 clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
39 #[step] Make lines parallel
40 parallel((77, 174), (580, 284))
42 #[check] Check that lines are parallel
44 #[step] Select 'Parallel' icon near the line
45 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 103, 255, 0, Qt.LeftButton)
46 #[check] Check that Input panel 'Parallel' appears, there are the names of lines in text boxes
47 waitFor("object.exists(':Parallel.First line_QLineEdit')", 20000)
48 test.compare(str(findObject(":Parallel.First line_QLineEdit").text), "SketchLine_1")
49 waitFor("object.exists(':Parallel.Second line_QLineEdit')", 20000)
50 test.compare(str(findObject(":Parallel.Second line_QLineEdit").text), "SketchLine_2")
51 #[check] Check that lines are selected and highlighted in viewer
53 #[step] Confirm 'Parallel' operation
54 clickButton(waitForObject(":Parallel.property_panel_ok_QToolButton"))
55 #[step] Confirm edition of the sketch
56 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
57 #[step] Close application