]> SALOME platform Git repositories - modules/shaper.git/blob - test.squish/suite_ISSUES_SALOME/tst_revolution_003/test.py
Salome HOME
Fix suite_ISSUES/tst_PARALLEL_2 for CentOS
[modules/shaper.git] / test.squish / suite_ISSUES_SALOME / tst_revolution_003 / test.py
1 def main():
2     #[project] NewGEOM
3     #[Scenario] Revolution_003
4     #[Topic] 'RevolutionCut by angles' 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_revolution_003.hdf'
19     open(DATA_PATH + "/for_revolution_003.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     
33     #[step] Execute RevolutionFuse operation
34     mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
35     mouseClick(waitForObjectItem(":_QMenu", "RevolutionCut"))
36     
37     #[step] Select sketch face
38     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 287, 236, 0, Qt.LeftButton)
39
40     # [step] Create 2 circles
41     circle_create_in_view((650, 364), (671, 392))
42     circle_create_in_view((641, 114), (664, 141))
43     
44     #[step] Approve sketching
45     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
46     
47     # [step] Select axis for revolution
48     mouseClick(waitForObject(":Revolution_QLineEdit_3"), 103, 11, 0, Qt.LeftButton)
49     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 750, 237, 0, Qt.LeftButton)
50     
51     #[step] Define angle 'To'
52     mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_5"), 61, 9, 0, Qt.LeftButton)
53     type(waitForObject(":Revolution.to_angle_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
54     type(waitForObject(":Revolution.to_angle_ModuleBase_ParamSpinBox_3"), 90)
55
56     #[step] Define angle 'From'
57     mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_6"), 104, 13, 0, Qt.LeftButton)
58     type(waitForObject(":Revolution.from_angle_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
59     type(waitForObject(":Revolution.from_angle_ModuleBase_ParamSpinBox_3"), 90)
60
61
62     #[step] Ok
63     clickButton(waitForObject(":RevolutionCut.property_panel_ok_QToolButton"))
64     
65     #[step] Rotate the model
66     type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
67     mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 558, 413, -33, -137, 67108866, Qt.RightButton)
68     
69     #[check] Check that operation has been executed successfully
70     test.vp("VP1")
71
72     # [step] Close application without saving
73     close_application()