From e3830203e1c6910e8fa1c5c8e18f42ab87ad7dc6 Mon Sep 17 00:00:00 2001 From: eso Date: Thu, 20 Aug 2015 10:38:38 +0300 Subject: [PATCH] Add new test --- test.squish/suite_ISSUES_SALOME/objects.map | 2 ++ .../shared/scripts/common.py | 29 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/test.squish/suite_ISSUES_SALOME/objects.map b/test.squish/suite_ISSUES_SALOME/objects.map index 561bc4e98..4393df38a 100644 --- a/test.squish/suite_ISSUES_SALOME/objects.map +++ b/test.squish/suite_ISSUES_SALOME/objects.map @@ -56,6 +56,7 @@ :Extrusion.qt_spinbox_lineedit_QLineEdit {container=':SALOME*.Extrusion_XGUI_PropertyPanel' name='qt_spinbox_lineedit' type='QLineEdit' visible='1'} :Extrusion.qt_spinbox_lineedit_QLineEdit_2 {container=':SALOME*.Extrusion_XGUI_PropertyPanel' name='qt_spinbox_lineedit' occurrence='2' type='QLineEdit' visible='1'} :Extrusion.to_size_ModuleBase_ParamSpinBox {container=':SALOME*.Extrusion_XGUI_PropertyPanel' name='to_size' type='ModuleBase_ParamSpinBox' visible='1'} +:Fixed.property_panel_cancel_QToolButton {container=':SALOME 7.6.0 - [Study1].Fixed_XGUI_PropertyPanel' name='property_panel_cancel' type='QToolButton' visible='1'} :Line.Auxiliary_QCheckBox {container=':SALOME 7.6.0 - [Study1].Line_XGUI_PropertyPanel' text='Auxiliary' type='QCheckBox' unnamed='1' visible='1'} :Line.End point_QGroupBox {container=':SALOME 7.6.0 - [Study1].Line_XGUI_PropertyPanel' title='End point' type='QGroupBox' unnamed='1' visible='1'} :Line.Start point_QGroupBox {container=':SALOME 7.6.0 - [Study1].Line_XGUI_PropertyPanel' title='Start point' type='QGroupBox' unnamed='1' visible='1'} @@ -94,6 +95,7 @@ :SALOME 7.6.0 - [Study1].Circle_QToolButton {text='Circle' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} :SALOME 7.6.0 - [Study1].Circle_XGUI_PropertyPanel {name='property_panel_dock' type='XGUI_PropertyPanel' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop' windowTitle='Circle'} :SALOME 7.6.0 - [Study1].Fit All_QToolButton {text='Fit All' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} +:SALOME 7.6.0 - [Study1].Fixed_XGUI_PropertyPanel {name='property_panel_dock' type='XGUI_PropertyPanel' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop' windowTitle='Fixed'} :SALOME 7.6.0 - [Study1].Line_QToolButton {text='Line' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} :SALOME 7.6.0 - [Study1].Line_XGUI_PropertyPanel {name='property_panel_dock' type='XGUI_PropertyPanel' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop' windowTitle='Line'} :SALOME 7.6.0 - [Study1].Object browser_QDockWidget {type='QDockWidget' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop' windowTitle='Object browser'} diff --git a/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py b/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py index 3addc6b56..5eaa09d84 100644 --- a/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py +++ b/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py @@ -214,7 +214,34 @@ def open(filename): clickButton(waitForObject(":SALOME 7.6.0.Open_QToolButton")) type(waitForObject(":fileNameEdit_QLineEdit_2"), filename) clickButton(waitForObject(":Open File.Open_QPushButton")) - + +def fixed(point): + mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Sketch")) + mouseClick(waitForObjectItem(":Sketch_QMenu", "Fixed")) + mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), point[0], point[1], 0, Qt.LeftButton) + clickButton(waitForObject(":Fixed.property_panel_cancel_QToolButton")) + + +def distance(start_point, end_point, annotation_point): + mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Sketch")) + mouseClick(waitForObjectItem(":Sketch_QMenu", "Distance")) + mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), start_point[0], start_point[1], 0, Qt.LeftButton) + mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), end_point[0], end_point[1], 0, Qt.LeftButton) + mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), annotation_point[0], annotation_point[1], 0, Qt.LeftButton) + + #if length!=0: + #type(waitForObject(":_ModuleBase_ParamSpinBox"), "") + #type(waitForObject(":_ModuleBase_ParamSpinBox"), length) + + clickButton(waitForObject(":Distance.property_panel_cancel_QToolButton")) + +def change_distance(point, value): + doubleClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), point[0], point[1], 0, Qt.LeftButton) + type(waitForObject(":Distance.ConstraintValue_ModuleBase_ParamSpinBox"), "") + type(waitForObject(":Distance.ConstraintValue_ModuleBase_ParamSpinBox"), 500) + clickButton(waitForObject(":Distance.property_panel_ok_QToolButton")) + + -- 2.39.2