]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
SQUIHS test for issue #474
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 13 Aug 2015 13:59:39 +0000 (16:59 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 13 Aug 2015 13:59:39 +0000 (16:59 +0300)
src/XGUI/XGUI_Workshop.cpp
test.squish/suite_ISSUES_SALOME/objects.map
test.squish/suite_ISSUES_SALOME/tst_474/test.py [new file with mode: 0644]

index 5f6b0e9fb18123997e1ad1328aa88c74455c3299..59c061997fcb464a9393729f9917db6cb4c934be 100644 (file)
@@ -1159,7 +1159,7 @@ bool XGUI_Workshop::deleteFeatures(const QObjectPtrList& theList,
     QMessageBox::StandardButton aRes = QMessageBox::warning(
         theParent, tr("Delete features"),
         QString(tr("Selected features are used in the following features: %1.\
-These features will be deleted.\n%2Would you like to continue?")).arg(aDirectNames)
+ These features will be deleted.\n%2Would you like to continue?")).arg(aDirectNames)
             .arg(aIndirectNames.isEmpty() ? QString() : QString("Also these features will be deleted: %1.\n").arg(aIndirectNames)),
         QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
     if (aRes != QMessageBox::Yes)
index e1895baa8de5dd6060954727f0cf2e3cb825ad00..71520ec62ffd54742d1ec59275f34a15a624183a 100644 (file)
@@ -2,6 +2,9 @@
 :Activate module_LightApp_ModuleDlg    {type='LightApp_ModuleDlg' unnamed='1' visible='1' windowTitle='Activate module'}
 :Close active study.Close w/o saving_QPushButton       {text='Close w/o saving' type='QPushButton' unnamed='1' visible='1' window=':Close active study_SUIT_MessageBox'}
 :Close active study_SUIT_MessageBox    {type='SUIT_MessageBox' unnamed='1' visible='1' windowTitle='Close active study'}
+:Delete features.No_QPushButton        {text='No' type='QPushButton' unnamed='1' visible='1' window=':Delete features_QMessageBox'}
+:Delete features._QLabel       {name='qt_msgbox_label' type='QLabel' visible='1' window=':Delete features_QMessageBox'}
+:Delete features_QMessageBox   {type='QMessageBox' unnamed='1' visible='1' windowTitle='Delete features'}
 :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'}
@@ -18,6 +21,7 @@
 :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*.New part_QToolButton  {text='New part' type='QToolButton' unnamed='1' visible='1' window=':SALOME*_STD_TabDesktop'}
 :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'}
diff --git a/test.squish/suite_ISSUES_SALOME/tst_474/test.py b/test.squish/suite_ISSUES_SALOME/tst_474/test.py
new file mode 100644 (file)
index 0000000..38ad1ce
--- /dev/null
@@ -0,0 +1,26 @@
+def main():
+    source(findFile("scripts", "common.py"))
+    
+    startApplication("salome_run.sh")
+    
+    create_new_document()
+    
+    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+    type(waitForObject(":Parameter_QLineEdit"), "aa")
+    type(waitForObject(":Parameter_ExpressionEditor"), "4")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+    clickButton(waitForObject(":SALOME*.New part_QToolButton"))
+    
+    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+    type(waitForObject(":Parameter_QLineEdit"), "bb")
+    type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
+    activateItem(waitForObjectItem(":_QMenu", "Delete"))
+    waitFor("object.exists(':Delete features._QLabel')", 20000)
+    test.compare(str(findObject(":Delete features._QLabel").text), "Selected features are used in the following features: bb.These features will be deleted.\nWould you like to continue?")
+    clickButton(waitForObject(":Delete features.No_QPushButton"))
+    
+    close_application()