Salome HOME
Composite feature adding subsolids. Fix problem with tag.
[modules/shaper.git] / test.squish / suite_FEATURE_EXTRUSION / tst_extrusion_004 / test.py
index 5dbbd53b67f15d89eb14c31896ca52c9cebedb52..7079c8f7fdb987bda0bc65c4352c9e08a175485a 100644 (file)
@@ -1,64 +1,84 @@
 def main():
-    #[project] NewGEOM
-    #[Scenario] Extrusion_004
-    #[Topic] 'Extrusion_Fuse by sizes' functionality
-    #[Tested functionality] 
-    #[Summary description]
-    #[Expected results]
-    #[General comments]
-    
+    # [project] NewGEOM
+    # [Scenario] Extrusion_004
+    # [Topic] 'Extrusion_Fuse by sizes' functionality
+    # [Tested functionality]
+    # [Summary description]
+    # [Expected results]
+    # [General comments]
+
     source(findFile("scripts", "common.py"))
-    
-    #[section] Application start
-    #[step] Launch SALOME
+
+    # [section] Application start
+    # [step] Launch SALOME
     startApplication("salome_run.sh")
 
     set_defaults()
-    
-    #[step] Open 'for_extrusion_003.hdf'
+
+    # [step] Open 'for_extrusion_003.hdf'
     open(DATA_PATH + "/for_extrusion_003.hdf")
-    
-    #[step] Activate NewGeom
+
+    # [step] Activate NewGeom
     clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
-    
+
     # [step] Activate Part_1
     waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
     clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 71, 10, 0, Qt.LeftButton)
     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 70, 9, 0)
     activateItem(waitForObjectItem(":_QMenu", "Activate"))
-    
-    #[step] Fit all
+
+    # [step] Fit all
     fit_all()
-    
-    #[step] Features - ExtrusionFuse
+    test.vp("INIT")
+
+    # [step] Features - ExtrusionFuse
     mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
     mouseClick(waitForObjectItem(":_QMenu", "ExtrusionFuse"))
-    
-    #[step] Select the upper face for sketching
+
+    # [step] Select the upper face for sketching
     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 243, 171, 0, Qt.LeftButton)
-    
-    #[step] Draw close contour, consisting from 4 lines
+
+    # [step] Click "Set plane view" in property panel [vp PLANE]
+    clickButton(waitForObject(":Sketcher plane.Set plane view_QPushButton"))
+    test.vp("PLANE")
+
+    # [step] Draw close contour, consisting from 4 lines
     lines_create_in_view([(83, 152), (85, 346), (669, 344), (669, 162), (83, 152)])
-    
-    #[step] Ok
+
+    # [check] Check that lines have been executed successfully [cp LINES]
+    fit_all()
+    test.vp("LINES")
+
+    # [step] Ok
     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
-    
-    # [step] Define value of 'To size' parameter of ExtrusionFuse, set it equal to 100 
+
+    # [step] Define value of 'To size' parameter of ExtrusionFuse, set it equal to 100
     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
     type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_3"), 100)
+    type(waitForObject(":Extrusion.to_size_ModuleBase_ParamSpinBox_3"), "<Return>")
 
-    #[step] Define value of 'From size' parameter of ExtrusionFuse, set it equal to 150 
+    # [check] Check that preview updated [cp PREVIEW_TO_SIZE]
+    fit_all()
+    test.vp("PREVIEW_TO_SIZE")
+
+    # [step] Define value of 'From size' parameter of ExtrusionFuse, set it equal to 150
     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
     type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), 150)
+    type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox_3"), "<Return>")
+
+    # [check] Check that preview updated [cp PREVIEW_FROM_SIZE]
+    fit_all()
+    test.vp("PREVIEW_FROM_SIZE")
 
-    #[step] Ok
+    # [step] Ok
     clickButton(waitForObject(":ExtrusionFuse.property_panel_ok_QToolButton"))
 
-    #[step] Click 'Reset view' toolbar button    
-    clickButton(waitForObject(":SALOME*.Reset_QToolButton"))
+    # [step] Click 'Reset view' toolbar button
+    clickButton(waitForObject(":SALOME*.Reset_QToolButton_2"))
+    mouseClick(waitForObject(":SALOME*_OCCViewer_ViewPort3d"), 10, 450, 0, Qt.LeftButton)  # close tool bar extension bar
+
+    # [check] Check that extrusionCut operation has been executed successfully [vp EXTRUSION_FUSE]
+    test.vp("EXTRUSION_FUSE")
 
-    #[check] Check that ExtrusionFuse operation has been executed successfully  
-    test.vp("VP1")
-   
     # [step] Close application without saving
     close_application()