Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / test.squish / suite_FEATURE_PARTITION / tst_partition_001 / test.py
1 def main():
2     # [project] SHAPER
3     # [Scenario] Partition_001
4     # [Topic] 'Partition' 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_partition_001.hdf'
19     open(DATA_PATH + "/for_partition_001.hdf")
20
21     # [step] Activate SHAPER
22     clickButton(waitForObject(":SALOME*.Shaper_QToolButton"))
23
24     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 95, 7, 0)
25     activateItem(waitForObjectItem(":_QMenu", "Activate"))
26     clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
27
28     # [step] Fit all
29     fit_all()
30     test.vp("VP_FITALL")
31
32     # [step] Create partition with horizontal plane [vp VP_PARTITION_1]
33     partition([(290, 170)], (176, 213))
34
35     test.vp("VP_PARTITION_1")
36
37     # [step] Create partition with vertical plane [vp VP_PARTITION_2]
38     partition([(260, 165), (295, 366)], (453, 432))
39
40     test.vp("VP_PARTITION_2")
41
42     #[step] Hide one of parts obtained in the viewer: select it, call context menu - Hide
43     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 291, 198, 0, Qt.LeftButton)
44     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 291, 198, 0, Qt.RightButton)
45     activateItem(waitForObjectItem(":_QtxMenu", "Hide"))
46
47     # [check] Check that partition has been executed successfully [vp VP_HIDE]
48     test.vp("VP_HIDE")
49
50     # [step] Close application without saving
51     close_application()