Salome HOME
Update copyrights
[modules/shaper.git] / test.squish / suite_STANDALONE / tst_c / test.py
1 # Copyright (C) 2014-2019  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 def main():
21     source(findFile("scripts", "common.py"))
22
23     startApplication("linux_run.sh")
24     set_defaults()
25
26     clickButton(waitForObject(":Operations.New part_AppElements_Button"))
27
28     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Sketch")
29     clickButton(waitForObject(":Basic.Sketch_AppElements_Button"))
30     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 351, 267, 0, Qt.LeftButton)
31     clickButton(waitForObject(":Basic.Line_AppElements_Button"))
32     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 242, 169, 0, Qt.LeftButton)
33     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 140, 394, 0, Qt.LeftButton)
34     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 531, 537, 0, Qt.LeftButton)
35     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 241, 169, 0, Qt.LeftButton)
36     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
37
38     test.vp("VP_SKETCH")
39
40     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
41     clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
42     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 216, 270, 0, Qt.LeftButton)
43     clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
44
45     test.vp("VP_EXTRUSION")
46
47     clickButton(waitForObject(":Extrusion.ExtrusionFuse_AppElements_Button"))
48     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 290, 316, 0, Qt.LeftButton)
49
50     clickButton(waitForObject(":OpenParts*.Fit all_QToolButton"))
51     test.vp("VP_EXTRUSIONFUSE")
52
53     mouseClick(waitForObject(":Sketch.Basic_AppElements_MenuGroupPanel"), 143, 56, 0, Qt.LeftButton)
54     clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
55     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 259, 248, 0, Qt.LeftButton)
56     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 281, 285, 0, Qt.LeftButton)
57     clickButton(waitForObject(":Sketch.Ok_QToolButton"))
58
59     mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit_5"), 42, 9, 0, Qt.LeftButton)
60     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_2"), "<Ctrl+A>")
61     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_2"), "3")
62     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_2"), "3")
63     mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit_6"), 93, 7, 0, Qt.LeftButton)
64     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
65     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "4")
66     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "4")
67     clickButton(waitForObject(":ExtrusionFuse.property_panel_ok_QToolButton"))
68
69     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Sketch")
70     clickButton(waitForObject(":Basic.Sketch_AppElements_Button"))
71     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 351, 267, 0, Qt.LeftButton)
72     clickButton(waitForObject(":Basic.Line_AppElements_Button"))
73     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 242, 169, 0, Qt.LeftButton)
74     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 140, 394, 0, Qt.LeftButton)
75     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 531, 537, 0, Qt.LeftButton)
76     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 241, 169, 0, Qt.LeftButton)
77     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
78
79     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
80     mouseDrag(waitForObject(":Features_QScrollArea"), 31, 1, -2, -2, 1, Qt.LeftButton)
81     clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
82     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 216, 270, 0, Qt.LeftButton)
83     clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
84     clickButton(waitForObject(":Extrusion.ExtrusionCut_AppElements_Button"))
85     clickButton(waitForObject(":Basic_QToolButton"))
86     clickButton(waitForObject(":Abort operation.OK_QPushButton"))
87     clickButton(waitForObject(":Extrusion.ExtrusionFuse_AppElements_Button"))
88     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 290, 316, 0, Qt.LeftButton)
89     mouseClick(waitForObject(":Sketch.Basic_AppElements_MenuGroupPanel"), 143, 56, 0, Qt.LeftButton)
90     clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
91     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 259, 248, 0, Qt.LeftButton)
92     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 281, 285, 0, Qt.LeftButton)
93     clickButton(waitForObject(":Sketch.Ok_QToolButton"))
94
95     mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit_5"), 42, 9, 0, Qt.LeftButton)
96     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_2"), "<Ctrl+A>")
97     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_2"), "33")
98     mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit_6"), 93, 7, 0, Qt.LeftButton)
99     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
100     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "44")
101     clickButton(waitForObject(":ExtrusionFuse.property_panel_ok_QToolButton"))
102
103     sendEvent("QCloseEvent", waitForObject(":OpenParts*_AppElements_MainWindow"))