From 0c64a21a042cfdd26920de8b2fbb11604547d4d0 Mon Sep 17 00:00:00 2001 From: spo Date: Thu, 13 Aug 2015 15:54:40 +0300 Subject: [PATCH] SQUISH test for refs #576 --- test.squish/suite_ISSUES_SALOME/objects.map | 24 ++++++++------ test.squish/suite_ISSUES_SALOME/suite.conf | 2 +- .../suite_ISSUES_SALOME/tst_576/test.py | 31 +++++++++++++++++++ .../suite_ISSUES_SALOME/tst_BASE/test.py | 19 ------------ 4 files changed, 47 insertions(+), 29 deletions(-) create mode 100644 test.squish/suite_ISSUES_SALOME/tst_576/test.py delete mode 100644 test.squish/suite_ISSUES_SALOME/tst_BASE/test.py diff --git a/test.squish/suite_ISSUES_SALOME/objects.map b/test.squish/suite_ISSUES_SALOME/objects.map index d676f5443..bd4b3185b 100644 --- a/test.squish/suite_ISSUES_SALOME/objects.map +++ b/test.squish/suite_ISSUES_SALOME/objects.map @@ -5,12 +5,18 @@ :Exit.Ok_QPushButton {text='Ok' type='QPushButton' unnamed='1' visible='1' window=':Exit_SalomeApp_ExitDlg'} :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'} -:SALOME 7.6.0 - [Study1].3D View Operations_OCCViewer_ViewPort3d {aboveWidget=':SALOME 7.6.0 - [Study1].3D View Operations_QtxToolBar' type='OCCViewer_ViewPort3d' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} -:SALOME 7.6.0 - [Study1].3D View Operations_QtxToolBar {name='OCCViewer3DViewOperations' type='QtxToolBar' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop' windowTitle='3D View Operations'} -: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].Sketch_QToolButton {text='Sketch' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} -:SALOME 7.6.0 - [Study1]_QToolButton {occurrence='16' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0 - [Study1]_STD_TabDesktop'} -:SALOME 7.6.0 - [Study1]_STD_TabDesktop {type='STD_TabDesktop' unnamed='1' visible='1' windowTitle='SALOME 7.6.0 - [Study1]'} -:SALOME 7.6.0.Geometry_QToolButton {text='Geometry' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0_STD_TabDesktop'} -:SALOME 7.6.0.NewGeom_QToolButton {text='NewGeom' type='QToolButton' unnamed='1' visible='1' window=':SALOME 7.6.0_STD_TabDesktop'} -:SALOME 7.6.0_STD_TabDesktop {type='STD_TabDesktop' unnamed='1' visible='1' windowTitle='SALOME 7.6.0'} +: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'} +: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*_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/suite.conf b/test.squish/suite_ISSUES_SALOME/suite.conf index 31148e983..a057ac870 100644 --- a/test.squish/suite_ISSUES_SALOME/suite.conf +++ b/test.squish/suite_ISSUES_SALOME/suite.conf @@ -1,5 +1,5 @@ AUT=salome_run.sh -CWD= +CWD= ENVVARS=envvars HOOK_SUB_PROCESSES=true IMPLICITAUTSTART=0 diff --git a/test.squish/suite_ISSUES_SALOME/tst_576/test.py b/test.squish/suite_ISSUES_SALOME/tst_576/test.py new file mode 100644 index 000000000..22b1f8c33 --- /dev/null +++ b/test.squish/suite_ISSUES_SALOME/tst_576/test.py @@ -0,0 +1,31 @@ +def main(): + startApplication("salome_run.sh") + + clickButton(waitForObject(":SALOME*.NewGeom_QToolButton")) + clickButton(waitForObject(":Activate module.New_QPushButton")) + + clickButton(waitForObject(":SALOME*.Parameter_QToolButton")) + type(waitForObject(":Parameter_QLineEdit"), "a") + type(waitForObject(":Parameter_ExpressionEditor"), "3") + clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton")) + + openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 3", 10, 10, 0) + activateItem(waitForObjectItem(":_QMenu", "Rename")) + type(waitForObject(":_QExpandingLineEdit"), "b") + type(waitForObject(":_QExpandingLineEdit"), "") + + waitFor("object.exists(':Parameters (1).b = 3_QModelIndex')", 20000) + test.compare(findObject(":Parameters (1).b = 3_QModelIndex").text, "b = 3") + + openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).b = 3", 111, 5, 0) + activateItem(waitForObjectItem(":_QMenu", "Edit...")) + waitFor("object.exists(':Parameter_QLineEdit')", 20000) + test.compare(str(findObject(":Parameter_QLineEdit").text), "b") + 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")) + diff --git a/test.squish/suite_ISSUES_SALOME/tst_BASE/test.py b/test.squish/suite_ISSUES_SALOME/tst_BASE/test.py deleted file mode 100644 index 2d6594702..000000000 --- a/test.squish/suite_ISSUES_SALOME/tst_BASE/test.py +++ /dev/null @@ -1,19 +0,0 @@ -def main(): - startApplication("salome_run.sh") - - clickButton(waitForObject(":SALOME 7.6.0.NewGeom_QToolButton")) - clickButton(waitForObject(":Activate module.New_QPushButton")) - clickButton(waitForObject(":SALOME 7.6.0 - [Study1].Sketch_QToolButton")) - mouseClick(waitForObject(":SALOME 7.6.0 - [Study1].3D View Operations_OCCViewer_ViewPort3d"), 437, 318, 0, Qt.LeftButton) - clickButton(waitForObject(":SALOME 7.6.0 - [Study1].Circle_QToolButton")) - mouseClick(waitForObject(":SALOME 7.6.0 - [Study1].3D View Operations_OCCViewer_ViewPort3d"), 384, 278, 0, Qt.LeftButton) - sendEvent("QMouseEvent", waitForObject(":SALOME 7.6.0 - [Study1].3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonPress, 556, 381, Qt.LeftButton, 1, 0) - sendEvent("QMouseEvent", waitForObject(":SALOME 7.6.0 - [Study1].3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonRelease, 556, 381, Qt.LeftButton, 0, 0) - clickButton(waitForObject(":SALOME 7.6.0 - [Study1].Circle_QToolButton")) - clickButton(waitForObject(":SALOME 7.6.0 - [Study1]_QToolButton")) - - sendEvent("QCloseEvent", waitForObject(":SALOME 7.6.0 - [Study1]_STD_TabDesktop")) - clickButton(waitForObject(":Exit.Shutdown servers_QCheckBox")) - sendEvent("QMoveEvent", waitForObject(":Exit_SalomeApp_ExitDlg"), 502, 326, 1265, 44) - clickButton(waitForObject(":Exit.Ok_QPushButton")) - clickButton(waitForObject(":Close active study.Close w/o saving_QPushButton")) -- 2.39.2