Salome HOME
Merge remote branch 'remotes/origin/vsr/gcc_4_9_compat' into Dev_2.1.0
[modules/shaper.git] / test.squish / suite_OBJECT_BROWSER / tst_ACTIVE_DOC_MANAGEMENT / test.py
index 68fabf937b0e3e0b8b2b00c02169a6b7d584bd17..41dda7783cca112d69ac5f439cc177c1351c282d 100644 (file)
@@ -12,7 +12,8 @@ def checkPartActivatedState(scenario):
                 "Constructions (4).YOZ",
                 "Constructions (4).XOZ",
                 "Constructions (4).XOY",
-                "Parts (1)"]
+                "Parts (1)",
+                "Parts (1).Part\\_1"]
     for element in allPartSetElements:
         test.compare(DISABLE_COLOR, waitForObjectItem(":Object browser_XGUI_DataTree", element).foregroundColor, "%s is disabled after: %s" % (element, scenario))
 
@@ -27,14 +28,6 @@ def checkPartActivatedState(scenario):
     #[step] Check that Part tree is unfolded
     test.compare(False, waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1").collapsed, "Part is unfolded after: %s" % scenario)
 
-#     #[step] Check that PartSet elements are folded
-#     partSetElements = [
-#                 "Parameters (0)", 
-#                 "Constructions (4)", 
-#                 "Parts (1)"]
-#     for element in partSetElements:
-#         test.compare(True, waitForObjectItem(":Object browser_XGUI_DataTree", element).collapsed, "%s is folded after: %s" % (element, scenario))
-
 def checkPartDeactivatedState(scenario):
     #[step] Check that Part id disabled and folded 
     partElements = [
@@ -54,16 +47,11 @@ def checkPartDeactivatedState(scenario):
                 "Constructions (4).YOZ",
                 "Constructions (4).XOZ",
                 "Constructions (4).XOY",
-                "Parts (1)"]
+                "Parts (1)",
+                "Parts (1).Part\\_1"]
     for element in allPartSetElements:
         test.compare(ENABLE_COLOR, waitForObjectItem(":Object browser_XGUI_DataTree", element).foregroundColor, "%s is enabled after: %s" % (element, scenario))
 
-def findMenuItem(menuObject, item):
-    for child in object.children(menuObject):
-        if child.text == item:
-            return child    
-    return None
-
 def main():
     source(findFile("scripts", "common.py"))
     
@@ -108,13 +96,13 @@ def main():
     test.compare(False, findMenuItem(waitForObject(":_QMenu"), "Activate").enabled, "Activate is disabled on active Part")
 
     #[step] Deactivate part by context menu on PartSet 
-    openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
+    openContextMenu(waitForObject(":Object browser.Part set_XGUI_ActiveDocLbl"), 10, 10, 0)
     activateItem(waitForObjectItem(":_QMenu", "Activate"))
     
     checkPartDeactivatedState("Part deactivation by context menu on PartSet")
 
     #[step] Check that Activate is disabled in PartSet context menu  
-    openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
+    openContextMenu(waitForObject(":Object browser.Part set_XGUI_ActiveDocLbl"), 10, 10, 0)
     test.compare(False, findMenuItem(waitForObject(":_QMenu"), "Activate").enabled, "Activate is disabled on active PartSet")
 
     #[step] Activate part by context menu on Part