1 ## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
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.
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.
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
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
23 # [Scenario] XAO-import
24 # [Topic] 'Exchange' functionality
25 # [Tested functionality]
26 # [Summary description]
30 source(findFile("scripts", "common.py"))
32 # [step] Launch SALOME
33 startApplication("salome_run.sh")
37 # [step] Activate NewGeom
40 # [step] Create new Part
41 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
42 activateItem(waitForObjectItem(":Part_QMenu", "New part"))
44 # [step] Create Import feature
45 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
46 activateItem(waitForObjectItem(":Part_QMenu", "Import"))
48 # [step] Select file 'exchange/xao/test.xao' and apply the feature
49 file_path = os.path.join(DATA_PATH, 'exchange', 'xao', 'test.xao');
50 mouseClick(waitForObject(":property_panel_dock...._QPushButton"), 10, 10, 0, Qt.LeftButton)
51 mouseClick(waitForObjectItem(":property_panel_dock.fileTypeCombo_QComboBox", "XAO files (*\\.XAO)"), 10, 10, 0, Qt.LeftButton)
52 type(waitForObject(":fileNameEdit_QLineEdit_3"), file_path)
53 type(waitForObject(":fileNameEdit_QLineEdit_3"), "<Return>")
54 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
56 # [step] Check that the body is visible in the view [vp BODY]
57 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Bodies (1).mygeom\\_1", 10, 10, 0)
58 activateItem(waitForObjectItem(":_QMenu", "Show only"))
62 # [step] In Object Browser check that the Import feature name is "mygeom"
63 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.mygeom")
65 # [step] In Object Browser check new body: mygeom_1
66 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Bodies (1).mygeom\\_1")
67 # [step] In Object Browser check new groups: boite_1, Group_2
68 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Groups (2).boite\\_1")
69 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Groups (2).Group\\_2")
71 # [step] Check the group boite_1 is a solid [vp GROUP_1]
72 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Groups (2).boite\\_1", 10, 10, 0)
73 activateItem(waitForObjectItem(":_QMenu", "Show only"))
77 # [step] Check the group Group_2 is a list of 2 faces [vp GROUP_2]
78 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Groups (2).Group\\_2", 10, 10, 0)
79 activateItem(waitForObjectItem(":_QMenu", "Show only"))
83 # [step] Close application without saving