X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test.squish%2Fsuite_FEATURE_PARAMETERS%2Ftst_474%2Ftest.py;h=b930102670bb35e7c0dcc4be486b53c35df784d9;hb=63d86e00e1e6a482fcad527ae0b883deccceed11;hp=181b7f49585bf74d54789cb091b0b2aacbc65185;hpb=0dea68c1a576f9d6ec93571fd717e484bc414236;p=modules%2Fshaper.git diff --git a/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py index 181b7f495..b93010267 100644 --- a/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py +++ b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py @@ -1,49 +1,70 @@ +# Copyright (C) 2014-2020 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + #[tested functionality] 1. Add parameter 2. Calculate parameter 3. Delete parameter def main(): source(findFile("scripts", "common.py")) - + startApplication("salome_run.sh") - - activate_newgeom() - + + activate_SHAPER() + #[step] Create parameter 'aa = 4' activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part")) activateItem(waitForObjectItem(":Part_QMenu", "Parameter")) type(waitForObject(":Parameter_QLineEdit"), "aa") type(waitForObject(":Parameter_ExpressionEditor"), "4") + type(waitForObject(":Parameter_ExpressionEditor"), "") clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton")) # check the new parameter waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4") clickButton(waitForObject(":SALOME*.New part_QToolButton")) - + activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part")) activateItem(waitForObjectItem(":Part_QMenu", "Parameter")) type(waitForObject(":Parameter_QLineEdit"), "bb") type(waitForObject(":Parameter_ExpressionEditor"), "aa+1") + type(waitForObject(":Parameter_ExpressionEditor"), "") clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton")) # check the new parameter waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5") - openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0) + openContextMenu(waitForObject(":Object browser.Part set_XGUI_ActiveDocLbl"), 10, 10, 0) activateItem(waitForObjectItem(":_QMenu", "Activate")) - + openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0) activateItem(waitForObjectItem(":_QMenu", "Delete")) waitFor("object.exists(':Delete features._QLabel')", 20000) - + an_expected = """Selected parameters are used in the following features: bb. These features will be deleted. Or parameters could be replaced by their values. -Would you like to continue?""" +Would you like to continue?""" test.compare(str(findObject(":Delete features._QLabel").text), an_expected) clickButton(waitForObject(":Delete features.No_QPushButton")) # nothing is deleted waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4") waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5") - + close_application()