]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
SQUISH test for issue #679
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 13 Aug 2015 13:44:19 +0000 (16:44 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 13 Aug 2015 13:44:19 +0000 (16:44 +0300)
test.squish/suite_ISSUES_SALOME/objects.map
test.squish/suite_ISSUES_SALOME/shared/scripts/common.py [new file with mode: 0644]
test.squish/suite_ISSUES_SALOME/tst_576/test.py
test.squish/suite_ISSUES_SALOME/tst_679/test.py [new file with mode: 0644]

index bd4b3185beed5f7b70f425c618fb26c407af90bf..e1895baa8de5dd6060954727f0cf2e3cb825ad00 100644 (file)
@@ -6,17 +6,25 @@
 :Exit.Shutdown servers_QCheckBox       {text='Shutdown servers' type='QCheckBox' unnamed='1' visible='1' window=':Exit_SalomeApp_ExitDlg'}
 :Exit_SalomeApp_ExitDlg        {type='SalomeApp_ExitDlg' unnamed='1' visible='1' windowTitle='Exit'}
 :Object browser_XGUI_DataTree  {container=':SALOME*.Object browser_QDockWidget' type='XGUI_DataTree' unnamed='1' visible='1'}
-:Parameter.Attribute "expression" invalidated by "Parameters_ExpressionValidator" with error: Expression is empty._ExpressionEditor    {aboveWidget=':Parameter.Attribute "expression" invalidated by "Parameters_ExpressionValidator" with error: Expression is empty._QLabel' container=':SALOME*.Parameter_XGUI_PropertyPanel' type='ExpressionEditor' unnamed='1' visible='1'}
 :Parameter.Attribute "expression" invalidated by "Parameters_ExpressionValidator" with error: Expression is empty._QLabel      {container=':SALOME*.Parameter_XGUI_PropertyPanel' text='Attribute "expression" invalidated by "Parameters_ExpressionValidator" with error: Expression is empty.' type='QLabel' unnamed='1' visible='1'}
 :Parameter.property_panel_ok_QToolButton       {container=':SALOME*.Parameter_XGUI_PropertyPanel' name='property_panel_ok' type='QToolButton' visible='1'}
 :Parameter_ExpressionEditor    {container=':SALOME*.Parameter_XGUI_PropertyPanel' type='ExpressionEditor' unnamed='1' visible='1'}
 :Parameter_QLineEdit   {container=':SALOME*.Parameter_XGUI_PropertyPanel' type='QLineEdit' unnamed='1' visible='1'}
 :Parameters (1).b = 3_QModelIndex      {column='0' container=':Parameters (1)_QModelIndex' text='b = 3' type='QModelIndex'}
 :Parameters (1)_QModelIndex    {column='0' container=':Object browser_XGUI_DataTree' text='Parameters (1)' type='QModelIndex'}
+:Point.qt_spinbox_lineedit_QLineEdit   {container=':SALOME*.Point_XGUI_PropertyPanel' name='qt_spinbox_lineedit' type='QLineEdit' visible='1'}
+:Point.qt_spinbox_lineedit_QLineEdit_2 {container=':SALOME*.Point_XGUI_PropertyPanel' name='qt_spinbox_lineedit' occurrence='2' type='QLineEdit' visible='1'}
+:Point.x_ModuleBase_ParamSpinBox       {container=':SALOME*.Point_XGUI_PropertyPanel' name='x' type='ModuleBase_ParamSpinBox' visible='1'}
+:Point_QFrame  {container=':SALOME*.Point_XGUI_PropertyPanel' type='QFrame' unnamed='1' visible='1'}
+:SALOME*.ConstructionPoint_QToolButton {container=':SALOME*.Construction_QtxToolBar' text='Point' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
+:SALOME*.Construction_QtxToolBar       {name='Construction' type='QtxToolBar' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Construction'}
 :SALOME*.NewGeom_QToolButton   {text='NewGeom' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
 :SALOME*.Object browser_QDockWidget    {type='QDockWidget' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Object browser'}
 :SALOME*.Parameter_QToolButton {text='Parameter' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
 :SALOME*.Parameter_XGUI_PropertyPanel  {name='property_panel_dock' type='XGUI_PropertyPanel' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Parameter'}
+:SALOME*.Point_XGUI_PropertyPanel      {name='property_panel_dock' type='XGUI_PropertyPanel' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Point'}
+:SALOME*.SketchPoint_QToolButton       {container=':SALOME*.Sketch_QtxToolBar' text='Point' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
+:SALOME*.Sketch_QtxToolBar     {name='Sketch' type='QtxToolBar' visible='1' window=':SALOME*_STD_TabDesktop' windowTitle='Sketch'}
 :SALOME*_STD_TabDesktop        {type='STD_TabDesktop' unnamed='1' visible='1' windowTitle?='SALOME*'}
 :_QExpandingLineEdit   {columnIndex='0' container=':Object browser_XGUI_DataTree' rowIndex='0' type='QExpandingLineEdit' unnamed='1' visible='1'}
 :_QMenu        {type='QMenu' unnamed='1' visible='1'}
diff --git a/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py b/test.squish/suite_ISSUES_SALOME/shared/scripts/common.py
new file mode 100644 (file)
index 0000000..071e7f9
--- /dev/null
@@ -0,0 +1,9 @@
+def create_new_document():
+    clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
+    clickButton(waitForObject(":Activate module.New_QPushButton"))
+    
+def close_application():
+    sendEvent("QCloseEvent", waitForObject(":SALOME*_STD_TabDesktop"))
+    clickButton(waitForObject(":Exit.Shutdown servers_QCheckBox"))
+    clickButton(waitForObject(":Exit.Ok_QPushButton"))
+    clickButton(waitForObject(":Close active study.Close w/o saving_QPushButton"))
\ No newline at end of file
index 22b1f8c33d2011349b6e0be5031ec8841e1d8e33..6c7e47513eda76a5166db9be82b9c71993adceee 100644 (file)
@@ -1,8 +1,9 @@
 def main():
-    startApplication("salome_run.sh")
+    source(findFile("scripts", "common.py"))
     
-    clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
-    clickButton(waitForObject(":Activate module.New_QPushButton"))
+    startApplication("salome_run.sh")
+   
+    create_new_document()
     
     clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
     type(waitForObject(":Parameter_QLineEdit"), "a")
@@ -24,8 +25,4 @@ def main():
     waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
     test.compare(str(findObject(":Parameter_ExpressionEditor").plainText), "3")
 
-    sendEvent("QCloseEvent", waitForObject(":SALOME*_STD_TabDesktop"))
-    clickButton(waitForObject(":Exit.Shutdown servers_QCheckBox"))
-    clickButton(waitForObject(":Exit.Ok_QPushButton"))
-    clickButton(waitForObject(":Close active study.Close w/o saving_QPushButton"))
-   
+    close_application()
diff --git a/test.squish/suite_ISSUES_SALOME/tst_679/test.py b/test.squish/suite_ISSUES_SALOME/tst_679/test.py
new file mode 100644 (file)
index 0000000..0a0a95b
--- /dev/null
@@ -0,0 +1,27 @@
+def main():
+    source(findFile("scripts", "common.py"))
+    
+    startApplication("salome_run.sh")
+    
+    create_new_document()
+    
+    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+    type(waitForObject(":Parameter_QLineEdit"), "a")
+    type(waitForObject(":Parameter_ExpressionEditor"), "3")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+    
+    clickButton(waitForObject(":SALOME*.ConstructionPoint_QToolButton"))
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "a")
+    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate")
+
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "b")
+
+    waitFor("object.exists(':Point_QFrame')", 20000)
+    test.compare(str(findObject(":Point_QFrame").toolTip), "Attribute \"x\" invalidated by \"Model_AttributeValidator\" with error: name 'b' is not defined")
+    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate\nErrors:\nAttribute \"x\" invalidated by \"Model_AttributeValidator\" with error: name 'b' is not defined")
+
+    close_application()