Salome HOME
NewGeom is renamed to SHAPER: "Shaper" named button is shown in SALOME, :SALOME*...
[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     # [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     test.vp("VP_AFTER_LOAD")
32     fit_all()
33     test.vp("VP_FITALL")
34
35     # [step] Create partition with horizontal plane [vp VP_PARTITION_1]
36     partition([(290, 170)], (270, 200))
37     test.vp("VP_PARTITION_1")
38
39     # [step] Create partition with vertical plane [vp VP_PARTITION_2]
40     partition([(360, 230), (320, 340)], (380, 240))
41     test.vp("VP_PARTITION_2")
42
43     # [step] Hide one of parts obtained in the viewer: select it, call context menu - Hide
44     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 291, 198, 0, Qt.LeftButton)
45     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 291, 198, 0, Qt.RightButton)
46     activateItem(waitForObjectItem(":_QtxMenu", "Hide"))
47
48     # [check] Check that partition has been executed successfully [vp VP_HIDE]
49     test.vp("VP_HIDE")
50
51     # [step] Close application without saving
52     close_application()