Salome HOME
NewGeom is renamed to SHAPER
[modules/shaper.git] / test.squish / suite_FEATURE_SKETCH / tst_sketch_012 / test.py
1
2 def main():
3     #[project] SHAPER
4     #[Scenario] Sketch_012
5     #[Topic] 'Length' functionality
6     #[Tested functionality] 
7     #[Summary description]
8     #[Expected results]
9     #[General comments]
10     
11     source(findFile("scripts", "common.py"))
12     
13     #[section] Application start
14     #[step] Launch SALOME
15     startApplication("salome_run.sh")
16
17     set_defaults()
18     
19     #[step] Open 'for_sketch_012.hdf'
20     open(DATA_PATH + "/for_sketch_012.hdf")
21     
22     #[step] Activate SHAPER
23     clickButton(waitForObject(":SALOME*.SHAPER_QToolButton"))
24     
25     #[step] Edit 'Sketch_1'
26     waitForObjectItem(":Object browser_XGUI_DataTree", "Sketch\\_1")
27     clickItem(":Object browser_XGUI_DataTree", "Sketch\\_1", 43, 12, 0, Qt.LeftButton)
28     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Sketch\\_1", 43, 12, 0)
29     activateItem(waitForObjectItem(":_QMenu", "Edit..."))
30     
31     #[step] Click '+OZ' button
32     clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
33     
34     #[step] Define length for main line
35     length((78, 376), (130, 341))
36     
37     #[step] Define length for auxilliary line
38     mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
39     mouseClick(waitForObjectItem(":Sketch_QMenu", "Length"))
40     mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 435, 443, 331, -417, 1, Qt.LeftButton)
41     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 546, 169, 0, Qt.LeftButton)
42     #clickButton(waitForObject(":Length.property_panel_ok_QToolButton"))
43     clickButton(waitForObject(":Length.property_panel_cancel_QToolButton"))
44     
45     #[check] Check that lengths have been defined successfully
46     test.vp("VP1")
47
48     # [step] Change length of main line to 200
49     change_length((125, 336), 200)
50     
51     #[step] Change length of auxilliary line to 500 
52     change_length((542, 169), 500)
53     
54     #[step] Click 'Fit all' button
55     fit_all()
56
57     #[check] Check that modifications have been executed successfully
58     test.vp("VP2")
59  
60     #[step] Close application without saving
61     close_application()