// Copy/Paste a node into another node in different navigation @Test() public void test02_CopyPasteNodeInDiffirentNavigation() { // Goto Group Sites goToGroupSites(); // Select Edit Navigation of Content Management waitForElementPresent(CONTENT_EDIT_NAVI_LINK); click(CONTENT_EDIT_NAVI_LINK); // Right click and select Copy Node on Content Explorer waitForElementPresent(CONTENT_EXPLORER); copyNode(CONTENT_EXPLORER); // Close Content Management Navigation waitForElementPresent(CLOSE_NAVIGATION); click(CLOSE_NAVIGATION); // Select Edit Navigation of Administration waitForElementPresent(ADMIN_EDIT_PROPERTIES_LINK); click(ADMIN_EDIT_PROPERTIES_LINK); // Right click and confirm Paste Node not exist on Node Portal Administration waitForElementPresent(PORTAL_ADMINISTRATION); rightClickOnElement(PORTAL_ADMINISTRATION); waitForElementNotPresent(ELEMENT_PASTE_NODE); // Close Content Management Navigation waitForElementPresent(CLOSE_NAVIGATION); click(CLOSE_NAVIGATION); }
// Copy/Paste a node into another node in the same navigation @Test() public void test01_CopyPasteNodeInSameNavigation() { // Goto Group Sites goToGroupSites(); // Select Edit Navigation of Content Management waitForElementPresent(CONTENT_EDIT_NAVI_LINK); click(CONTENT_EDIT_NAVI_LINK); // Copy Node on Content Explorer waitForElementPresent(CONTENT_EXPLORER); copyNode(CONTENT_EXPLORER); // Paste Node on Content Administration waitForElementPresent(CONTENT_ADMINISTRATION); pasteNode(CONTENT_ADMINISTRATION); // Save save(); waitForElementNotPresent(CONTENT_EXPLORER); // Select Edit Navigation of Content Management waitForElementPresent(CONTENT_EDIT_NAVI_LINK); click(CONTENT_EDIT_NAVI_LINK); click(CONTENT_ADMINISTRATION); // Verify Copy/Paste result and Reset data waitForElementPresent(CHILD_NODE); rightClickOnElement(CHILD_NODE); click(ELEMENT_NODE_DELETE); waitForConfirmation(DELETE_CONFIRMATION_MESSAGE); waitForElementNotPresent(CHILD_NODE); save(); waitForElementNotPresent(CONTENT_EXPLORER); }
// Copy/Paste a node into the same place @Test() public void test03_CopyPasteNodesInSamePlace() { // Goto Group Sites goToGroupSites(); // Select Edit Navigation of Content Management waitForElementPresent(CONTENT_EDIT_NAVI_LINK); click(CONTENT_EDIT_NAVI_LINK); // Copy Node on Content Explorer waitForElementPresent(CONTENT_EXPLORER); copyNode(CONTENT_EXPLORER); // Paste Node on Content Administration waitForElementPresent(CONTENT_ADMINISTRATION); pasteNode(CONTENT_ADMINISTRATION); // Save save(); waitForElementNotPresent(CONTENT_EXPLORER); // Select Edit Navigation of Content Management waitForElementPresent(CONTENT_EDIT_NAVI_LINK); click(CONTENT_EDIT_NAVI_LINK); click(CONTENT_ADMINISTRATION); copyNode(By.xpath(CHILD_NODE)); pasteNode(CONTENT_ADMINISTRATION); // Verify display message to notice that Node already existed waitForTextPresent(SAME_PLACE_MESSAGE); click(OK_BUTTON); rightClickOnElement(CHILD_NODE); click(ELEMENT_NODE_DELETE); waitForConfirmation(DELETE_CONFIRMATION_MESSAGE); waitForElementNotPresent(CHILD_NODE); save(); waitForElementNotPresent(CONTENT_EXPLORER); }
/** * Delete node with deleting confirmation CaseID 73406 Step 1: Show Edit Navigation form Step 2: * Delete node Step 3: Check page of deleted node */ @Test public void test01_DeleteNodeWithDeletingConfirmation() { /*Declare variables*/ String groupNameDisplayName = "aagroup73406"; String nodeName = "nodeTest73406"; String pageSelectorName = "page73406"; String nodeLinkToEdit = ELEMENT_NODE_LINK.replace("${nodeLabel}", nodeName); Map<String, String> languages = new HashMap<String, String>(); languages.put("English", ""); /*Create data*/ info("Create new group with John"); navTool.goToUsersAndGroupsManagement(); group.chooseGroupTab(); group.addGroup(groupNameDisplayName, null, null, true); info("Add new navigation for new group"); navTool.goToGroupSites(); addNewNavigationForGroup(groupNameDisplayName); info("Add a new node for group"); addNodeForGroup( groupNameDisplayName, "", true, nodeName, true, languages, nodeName, pageSelectorName, pageSelectorName, true, true); /* Step 1: Show Edit Navigation form */ // - Login by admin or user is manager of at least the exited group navigation // - Click Group link and choose a group navigation // - Click Edit navigation link // Show Navigation management form editNavigation(groupNameDisplayName); /* Step 2: Delete node */ // - chose a node // - Right click on node & select Delete node // - Click OK to confirm // Node is removed rightClickOnElement(nodeLinkToEdit); click(ELEMENT_NAVIGATION_DELETE_NODE); magAlert.acceptAlert(); waitForElementNotPresent(nodeLinkToEdit); button.save(); waitForElementNotPresent(button.ELEMENT_SAVE_BUTTON); /* Step 3: Check page of deleted node */ // Go to Page Management, check existing of page that deleted node linked to // Page still exists navToolbar.goToManagePages(); pageMag.searchPageInManagementPage(PageType.GROUP, pageSelectorName, true); waitForAndGetElement( pageMag .ELEMENT_LIST_PAGE .replace("${number}", "1") .replace("${titlePage}", pageSelectorName)); /*Clear data*/ info("-- Clear data --"); pageMag.deletePage(PageType.GROUP, pageSelectorName); navTool.goToGroupSites(); deleteNavigationForGroup(groupNameDisplayName); navTool.goToUsersAndGroupsManagement(); group.chooseGroupTab(); click(By.linkText(groupNameDisplayName)); group.deleteGroup(groupNameDisplayName, true, 60000); }
/** * Delete node with deleting confirmation CaseID 73485 Step 1: Show Edit group's navigation Step * 2: Show form to add new node Step 3: Create node */ @Test public void test02_CreateNewNodeAsChildOfExistingNode() { /*Declare variables*/ String groupNameDisplayName = "aagroup73485"; String nodeName = "nodeTest73485"; String subNodeName = "subNode73485"; String pageSelectorName = "page73485"; String subPageSelectorName = "subpage73485"; Map<String, String> languages = new HashMap<String, String>(); languages.put("English", ""); /*Create data*/ info("Create new group with John"); navTool.goToUsersAndGroupsManagement(); group.chooseGroupTab(); group.addGroup(groupNameDisplayName, null, null, true); info("Add new navigation for new group"); navTool.goToGroupSites(); addNewNavigationForGroup(groupNameDisplayName); info("Add a new node for group"); addNodeForGroup( groupNameDisplayName, "", true, nodeName, true, languages, nodeName, pageSelectorName, pageSelectorName, true, true); /* Step 1: Show Edit group's navigation */ // - Login by user is manager of at least the exited group navigation // - Click on Group link // - Select a Group navigation and click on [Edit navigation] link // Edit Group navigation is show with all exited node on group's nav editNavigation(groupNameDisplayName); /* Step 2: Show form to add new node */ // - Choose a parent node // - Right click on one node & select Add new node // Add new node form is shown properly /* Step 3: Create node */ // - Input values for required field // - Click Save // New node is created successfully & displayed as sub node of selected parent info("Add a sub new node for group"); addNodeForGroup( groupNameDisplayName, nodeName, true, subNodeName, true, languages, subNodeName, subPageSelectorName, subPageSelectorName, true, true); /*Clear data*/ info("-- Clear data --"); navToolbar.goToManagePages(); pageMag.deletePage(PageType.GROUP, subPageSelectorName); pageMag.deletePage(PageType.GROUP, pageSelectorName); navTool.goToGroupSites(); deleteNavigationForGroup(groupNameDisplayName); navTool.goToUsersAndGroupsManagement(); group.chooseGroupTab(); click(By.linkText(groupNameDisplayName)); group.deleteGroup(groupNameDisplayName, true, 60000); }