Salome HOME
Add SQSUIH test for Platine model created by PythonAPI
[modules/shaper.git] / test.squish / suite_PYTHONAPI_SALOME / tst_Platine / test.py
1 def main():
2     # [project] NewGEOM
3     # [Scenario] 'Platine' model created by PythonAPI
4     # [Topic] PythonAPI 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] Activate Shaper module and create new file
19     activate_newgeom()
20
21     # [step] In Python console type: import examples.Platine
22     type(waitForObject(":Python Console_PyConsole_EnhEditor"), "import examples.Platine")
23     type(waitForObject(":Python Console_PyConsole_EnhEditor"), "<Return>")
24     clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
25
26     # [step] Check that the model is correct [vp VP_PLATINE]
27     test.vp("VP_PLATINE")
28
29     # [step] Check that the object browser contains all objects from the model [vp VP_TREE]
30     waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (3)")
31     clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (3)", -10, 10, 0, Qt.LeftButton)
32     waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Constructions (3)")
33     clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Constructions (3)", -10, 10, 0, Qt.LeftButton)
34     waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Bodies (1)")
35     clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Bodies (1)", -10, 10, 0, Qt.LeftButton)
36     test.vp("VP_TREE")
37
38     # [step] Close application without saving
39     close_application()