/**
  * Delete a space
  *
  * @param name
  * @param params
  */
 public void deleteSpace(String name, int... params) {
   info("-- Deleting Space..." + name);
   int iTimeout = params.length > 0 ? params[0] : DEFAULT_TIMEOUT;
   spSearch.searchSpaceByName(name, true);
   Utils.pause(2000);
   doAction("Delete", name);
   magAlert.acceptAlert();
   button.ok();
   Utils.pause(1000);
   waitForElementNotPresent(
       By.xpath(
           ELEMENT_ACTION_USER_ON_SPACE
               .replace("${spaceName}", name)
               .replace("${action}", "Delete")),
       iTimeout);
   info(name + " was deleted successfully");
   Utils.pause(2000);
 }
  /**
   * 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);
  }