X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.squish%2Fsuite_FEATURE_PARAMETERS%2Ftst_474%2Ftest.py;h=11635a5eb50e3ef2093f2dabed3b2fe8cc9d1a2d;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=94da0d06b37e7bb489fab69c493358265ff790c7;hpb=a088e90ea750e7eecbb5345ad36114398bd3c176;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 94da0d06b..11635a5eb 100644 --- a/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py +++ b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py @@ -1,12 +1,31 @@ +# Copyright (C) 2014-2024 CEA, EDF +# +# 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")) @@ -19,7 +38,7 @@ def main(): 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") @@ -32,20 +51,20 @@ def main(): 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()