Salome HOME
Fix suite_FEATURE_CONSTRUCTION/tst_construction_001
[modules/shaper.git] / test.squish / suite_FEATURE_CONSTRUCTION / tst_construction_001 / test.py
1 def main():
2     # [project] NewGEOM
3     # [Scenario] Construction_001
4     # [Topic] 'Construction of point, axis and plane' functionality
5     # [Tested functionality]
6     # [Summary description]
7     # [Expected results]
8     # [General comments]
9
10     source(findFile("scripts", "common.py"))
11
12     # [section] Application start
13     # [step] Launch SALOME
14     startApplication("salome_run.sh")
15
16     set_defaults()
17
18     # [step] Open 'for_construction_001.hdf'
19     open(DATA_PATH + "/for_construction_001.hdf")
20
21     # [step] Activate NewGeom
22     clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
23
24     # [step] Activate Part_1
25     waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
26     clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 71, 10, 0, Qt.LeftButton)
27     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 70, 9, 0)
28     activateItem(waitForObjectItem(":_QMenu", "Activate"))
29
30     # [step] Fit all
31     fit_all()
32     test.vp("INIT")
33
34     # [step] Create plane basing on upper face of the box
35     plane((340, 120), 100)
36
37     # [step] Fit all
38     fit_all()
39
40     # [check] Check that plane has been created [vp PLANE]
41     test.vp("PLANE")
42
43     # [step] Create 2 points by property panel
44     point(-50, -50, 125)
45     point(50, 50, 125)
46
47     # [step] Fit all
48     clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
49
50     # [check] Check that the points have been created [vp POINTS]
51     test.vp("POINTS")
52
53     # [step] Create axis between the 2 points
54     axis((213, 142), (538, 142))
55
56     # [check] Check that the axis have been created [vp AXIS]
57     test.vp("AXIS")
58
59     # [step] Close application without saving
60     close_application()