/** Qmetry: ID 67006 -- Case No 034 / ID 001 -- Copy/Paste a Category to a Category -- */
  @Test
  public void test01_CopyPasteACategoryToACategory() {
    info("-- Step 1: Create a Category --");

    String categoryTreeName = "CategoryAction01";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {groupID, "*"};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, false, true, form2, DATA_USER1, setPermission, form3);
    waitForTextPresent(categoryTreeName);

    info("-- Step 2: Copy a Category --");
    magCa.addChildCategory(categoryTreeName, categoryName);
    ecms.clickUpLevel();
    magCa.addChildCategory(categoryTreeName, newCategoryName, true);

    info("-- Step 3: Paste a copied Category --");
    magCa.copyAndPasteCategory(categoryName, newCategoryName);
    info("-- Restore original data --");
    button.close();
    magCa.deleteCategory(categoryTreeName);

    info("-- Sign Out --");
    // magAcc.signOut();
  }
Exemplo n.º 2
0
 /////////////////
 // Go To Content Administration / Repository / Manage Lock Tab
 public void goToLockedTab() {
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_MANAGE_LOCKS, 5000, 0) == null) {
     click(ELEMENT_REPOSITORY_TAB);
   }
   click(ELEMENT_MANAGE_LOCKS);
 }
  /** Qmetry: ID 66793 -- Case No 040 / ID 007 -- Cut a Category and paste into itself -- */
  @Test
  public void test07_CutACategoryAndPasteIntoItself() {
    info("-- Step 1: Create a Category --");

    String categoryTreeName = "categoryAction07";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {groupID, "*"};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, false, true, form2, DATA_USER1, setPermission, form3);
    waitForTextPresent(categoryTreeName);

    info("-- Step 2: Cut a Category --");
    magCa.addChildCategory(categoryTreeName, categoryName);
    click(magCa.ELEMENT_CUT_CATEGORY_ICON.replace("${categoryName}", categoryName));

    info("-- Step 3: Paste cut Category into itself --");
    click(magCa.ELEMENT_PASTE_TO_CATEGORY_ICON.replace("${categoryName}", categoryName));
    alert.verifyAlertMessage(
        magCa.MESSAGE_INFO_CUT_TO_CATEGORY.replace(
            "${pathCategory}", "/sites/intranet/" + categoryTreeName + "/" + categoryName + ""));

    info("-- Restore original data --");
    button.close();
    magCa.deleteCategory(categoryTreeName);

    info("-- Sign Out --");
    // signOut();
  }
Exemplo n.º 4
0
 // Go To Content Administration / Repository / Namespaces
 public void goToNamespacesTab() {
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_MANAGE_NAME_SPACE_LINK, 5000, 0) == null) {
     click(ELEMENT_REPOSITORY_TAB);
   }
   click(ELEMENT_MANAGE_NAME_SPACE_LINK);
 }
Exemplo n.º 5
0
 // Go to [Metadata] tab
 public void goToMetadataTab() {
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_METADATA_LINK, 5000, 0) == null) {
     click(ELEMENT_TEMPLATE_TAB);
   }
   click(ELEMENT_METADATA_LINK);
 }
  /** Qmetry: ID 66909 -- Case No 036 / ID 003 -- Copy a Category and paste into itself -- */
  @Test
  public void test03_CopyACategoryAndPasteIntoItself() {
    By ELEMENT_SELECTED_CATEGORY_NAME =
        By.xpath(cMenu.ELEMENT_FILE_TITLE.replace("${titleOfFile}", categoryName));

    info("-- Step 1: Create a Category --");

    String categoryTreeName = "categoryAction03";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {"", ""};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, true, false, form2, DATA_USER1, setPermission, form3);
    waitForTextPresent(categoryTreeName);

    info("-- Step 2: Copy a Category --");
    magCa.addChildCategory(categoryTreeName, categoryName);
    click(magCa.ELEMENT_COPY_CATEGORY_ICON.replace("${categoryName}", categoryName));

    info("-- Step 3: Paste copied Category into itself --");
    click(magCa.ELEMENT_PASTE_TO_CATEGORY_ICON.replace("${categoryName}", categoryName));
    click(ELEMENT_SELECTED_CATEGORY_NAME);
    waitForTextPresent(categoryName);

    info("-- Restore original data --");
    button.close();
    magCa.deleteCategory(categoryTreeName);

    info("-- Sign Out --");
    // signOut();
  }
Exemplo n.º 7
0
 // Open [List Template] Screen
 public void goToListTemplateTab() {
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_DOCUMENT_LINK, 5000, 0) == null) {
     click(ELEMENT_TEMPLATE_TAB);
   }
   click(ELEMENT_LIST_LINK);
   waitForAndGetElement(By.xpath("//*[text()='Add Template']"));
 }
Exemplo n.º 8
0
 // Go To Content Administration / Repository / Node Types Tab
 public void goToNodeTypeTab() {
   navToolbar.goToContentAdministration();
   if (isTextNotPresent("Node Types")) {
     click(ELEMENT_REPOSITORY_TAB);
     click(ELEMENT_MANAGE_NODETYPE);
   }
   waitForAndGetElement(By.xpath("//*[@class='title' and contains(text(), 'Node Types')]"));
 }
Exemplo n.º 9
0
 // Go to Actions Tab
 public void goToActionsTabInContentAdmin() {
   navToolbar.goToContentAdministration();
   if (isElementNotPresent(ELEMENT_ADD_ACTION_TYPE_BUTTON)) {
     if (isTextNotPresent("Categories")) {
       click(ELEMENT_ADVANCED_CONFIGURATION_TAB);
     }
     click(ELEMENT_MANAGE_ACTIONS_LINK);
   }
   Utils.pause(500);
 }
Exemplo n.º 10
0
 /*
  * @Modify by: PhuongDT
  * @date: 27/08/2013
  * @Content: Change condition to verify element Document
  */
 public void goToTemplateTab() {
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_DOCUMENT_LINK, 5000, 0) == null) {
     //	if (isTextNotPresent("Documents")){
     //		if(isElementNotPresent(ELEMENT_DOCUMENT_LINK_XPATH)){
     click(ELEMENT_TEMPLATE_TAB);
   }
   click(ELEMENT_DOCUMENT_LINK);
   waitForAndGetElement(ELEMENT_MANAGE_TEMPLATE_SCREEN);
 }
Exemplo n.º 11
0
 // Go to Tags
 public void goToTagsTab() {
   info("Go to Tags tab");
   navToolbar.goToContentAdministration();
   if (waitForAndGetElement(ELEMENT_MANAGE_TAGS, 5000, 0) == null) {
     click(ELEMENT_EXPLORER_TAB);
   }
   click(ELEMENT_MANAGE_TAGS);
   // waitForTextPresent("Tag Manager");
   Utils.pause(1000);
 }
Exemplo n.º 12
0
  // Function to go to Manage Driver from main screen
  public void goToManageDrive() {
    info("Go to manage driver form");
    navToolbar.goToContentAdministration();

    if (waitForAndGetElement(ELEMENT_DRIVES_TAB, 5000, 0) == null) {
      click(ELEMENT_EXPLORER_TAB);
    }
    click(ELEMENT_DRIVES_TAB);
    Utils.pause(500);
  }
Exemplo n.º 13
0
 // Advanced: Categories/Queries/Scripts/Actions
 // Go to Category Tab in Content Admin
 public void goToCategoriesTabInContentAdmin() {
   navToolbar.goToContentAdministration();
   /*if (isTextNotPresent("Category Tree")){
   	if (isTextNotPresent("Queries")){
   		click(ELEMENT_ADVANCED_CONFIGURATION_TAB);
   	}
   	click(ELEMENT_MANAGE_CATEGORIES_LINK);
   }*/
   if (waitForAndGetElement(ELEMENT_MANAGE_CATEGORIES_LINK, 5000, 0) != null) {
     click(ELEMENT_MANAGE_CATEGORIES_LINK);
   } else {
     click(ELEMENT_ADVANCED_CONFIGURATION_TAB);
     click(ELEMENT_MANAGE_CATEGORIES_LINK);
   }
   Utils.pause(500);
 }
Exemplo n.º 14
0
 // Go to Manage View Screen
 public void goToManageViews() {
   navToolbar.goToContentAdministration();
   /*if (isTextNotPresent("Explorer Templates")){
   	if (isTextNotPresent("Drives")){
   		click(ELEMENT_EXPLORER_TAB);
   	}
   	click(ELEMENT_MANAGEMENT_VIEW);
   }*/
   if (waitForAndGetElement(ELEMENT_MANAGEMENT_VIEW, 5000, 0) != null) {
     click(ELEMENT_MANAGEMENT_VIEW);
   } else {
     click(ELEMENT_EXPLORER_TAB);
     click(ELEMENT_MANAGEMENT_VIEW);
   }
   Utils.pause(500);
 }
  /** Qmetry: ID 66856 Delete Category Tree */
  @Test
  public void test11_DeleteCategoryTree() {
    info("-- Step 1: Create a Category --");

    String categoryTreeName = "categoryAction11";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {groupID, "*"};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, false, true, form2, DATA_USER1, setPermission, form3);

    info("-- Step 2: Delete a Category --");
    magCa.deleteCategory(categoryTreeName);
  }
  /** Qmetry: ID 66792 -- Case No 039 / ID 006 -- Cut a Category and paste into its child node -- */
  @Test
  public void test06_CutACategoryAndPasteIntoItsChildNode() {
    By ELEMENT_SELECTED_CATEGORY_NAME =
        By.xpath(cMenu.ELEMENT_FILE_TITLE.replace("${titleOfFile}", categoryName));

    info("-- Step 1: Create a Category --");

    String categoryTreeName = "categoryAction06";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {groupID, "*"};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, false, true, form2, DATA_USER1, setPermission, form3);
    waitForTextPresent(categoryTreeName);

    info("-- Step 2: Cut a Category --");
    magCa.addChildCategory(categoryTreeName, categoryName);
    magCa.addChildCategory(categoryName, newCategoryName, true);
    ecms.clickUpLevel();
    click(magCa.ELEMENT_CUT_CATEGORY_ICON.replace("${categoryName}", categoryName));

    info("-- Step 3: Paste a cut Category into its child node --");
    click(ELEMENT_SELECTED_CATEGORY_NAME);
    click(magCa.ELEMENT_PASTE_TO_CATEGORY_ICON.replace("${categoryName}", newCategoryName));
    waitForMessage(magCa.MESSAGE_INFO_PASTE_TO_CATEGORY);
    // dialog.closeMessageDialog();
    click(button.ELEMENT_OK_BUTTON);

    info("-- Restore original data --");
    button.close();
    magCa.deleteCategory(categoryTreeName);

    info("-- Sign Out --");
    // signOut();
  }
  /** Qmetry: ID 67007 -- Case No 037 / ID 004 -- Copy/Paste a deleted Category -- */
  @Test
  public void test04_CopyPasteADeletedCategory() {
    info("-- Step 1: Create a Category --");
    String categoryTreeName = "categoryAction04";

    nav.goToContentAdministration();

    // Add category tree
    String[] form1 = {categoryTreeName, categoryWorkspace, nodeHomePath};
    String[] form2 = {groupID, "*"};
    String[] form3 = {actionName, optionLifeCycle, nodeTargetPath};
    boolean[] setPermission = {true, false, false};
    magCa.addNewCategoryTree(form1, false, true, form2, DATA_USER1, setPermission, form3);
    waitForTextPresent(categoryTreeName);

    info("-- Step 2: Copy a Category --");
    magCa.addChildCategory(categoryTreeName, categoryName);
    ecms.clickUpLevel();
    magCa.addChildCategory(categoryTreeName, newCategoryName);

    click(magCa.ELEMENT_COPY_CATEGORY_ICON.replace("${categoryName}", newCategoryName));

    info("-- Step 3: Delete Category --");
    magCa.deleteCategory(newCategoryName);

    info("-- Step 4: Paste deleted Category --");
    click(magCa.ELEMENT_PASTE_TO_CATEGORY_ICON.replace("${categoryName}", categoryName));
    waitForMessage(magCa.MESSAGE_INFO_PASTE_TO_CATEGORY);
    // dialog.closeMessageDialog();
    click(button.ELEMENT_OK_BUTTON);

    info("-- Restore original data --");
    button.close();

    magCa.deleteCategory(categoryTreeName);

    info("-- Sign Out --");
    // signOut();
  }