/**
   * Case ID:76660. Test Case Name: Open user guide in a new tab. Pre-Condition: Post-Condition:
   * Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test02_OpenUserGuideInANewTab() {
    info("Test 2: Open user guide in a new tab");
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.GettingStarted.SocialIntranetHomepage.html";
    /*
    - Connect to Intranet
     *Expected Outcome:
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    info("Help button is displayed");
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened to displayed the online user guide		*/
    info("Click on Help button");
    click(ELEMENT_HELP_ICON);
    info("Open new window");
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /**
   * Case ID:76640. Test Case Name: Display checkbox in the "Content" entry. Pre-Condition: The
   * current user is an editor. Post-Condition: Done with OSs and browsers : Generated by chinhdtt
   * at 2014/03/19 17:25:04
   */
  @Test
  public void test01_DisplayCheckboxInTheContentEntry() {
    info("Test 1: Display checkbox in the Content entry");
    /*
    - Connect to Intranet
     *Input Data:
     *Expected Outcome:
    - The top navigation bar is displayed
    - The button "Edit" is displayed		*/
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_MENU_EDIT_LINK);

    /*
    - Mouse over on the button "Edit"
     *Input Data:
     *Expected Outcome:
    - The Edit menu is displayed
    - The checkbox in the content entry is displayed* if crossed: the user is on edit mode* if decrossed: the user is not in edit mode		*/
    mouseOverAndClick(ELEMENT_MENU_EDIT_LINK);
    waitForAndGetElement(ELEMENT_MENU_EDIT_CONTENT_TEXT);
    waitForAndGetElement(nav.ELEMENT_MENU_EDIT_CONTENT_UNCHECK);
    click(nav.ELEMENT_MENU_EDIT_CONTENT_UNCHECK);
    Utils.pause(500);
    mouseOverAndClick(ELEMENT_MENU_EDIT_LINK);
    Utils.pause(500);
    waitForAndGetElement(nav.ELEMENT_MENU_EDIT_CONTENT);
  }
  /**
   * Case ID:76680. Test Case Name: Open user guide when user is on Spaces. Pre-Condition:
   * Post-Condition: Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test22_OpenUserGuideWhenUserIsOnSpaces() {
    info("Test 22 Open user guide when user is on Spaces");
    String spaceName = "Space" + getRandomNumber();
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.WorkingWithSpaces.html";

    /*
    - Connect to Intranet
    - Open Spaces application
     *Expected Outcome:
    - TheSpaces list page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    mMember.goToAllSpaces();
    mMember.addNewSpace(spaceName, spaceName);
    Utils.pause(1000);
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.WorkingWithSpaces.html		*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /**
   * Case ID:76663. Test Case Name: Open user guide when user is in "My Profile" screen.
   * Pre-Condition: Post-Condition: Done with OSs and browsers : Generated by chinhdtt at 2014/05/19
   * 12:12:55
   */
  @Test
  public void test05_OpenUserGuideWhenUserIsInMyProfileScreen() {
    info("Test 5: Open user guide when user is in My Profile screen");
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.ManagingYourPersonalApplications.ManagingYourProfile.html";
    /*
    - Connect to Intranet
    - Open "My Profile" screen
     *Expected Outcome:
    - The"My Profile" page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    nav.goToMyProfile();
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    info("Help button is displayed");
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.ManagingYourPersonalApplications.ManagingYourProfile.html		*/
    click(ELEMENT_HELP_ICON);
    info("Check URL is shown");
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /**
   * Case ID:76676. Test Case Name: Open user guide when user is on Documents. Pre-Condition:
   * Post-Condition: Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test18_OpenUserGuideWhenUserIsOnDocuments() {
    info("Test 18 Open user guide when user is on Documents");
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.ManagingYourDocuments.html";

    /*
    - Connect to Intranet
    - Open Documents application
     *Expected Outcome:
    - TheDocuments page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    info("Click on Documments");
    click(ELEMENT_PERSONAL_DOCUMENTS);
    Utils.pause(500);
    waitForAndGetElement(By.id("UIFileViewCheckBox"), 3000, 1, 2);
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.ManagingYourDocuments.html		*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /**
   * Case ID:76681. Test Case Name: Open user guide when user is on Wiki. Pre-Condition:
   * Post-Condition: Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test23_OpenUserGuideWhenUserIsOnWiki() {
    info("Test 23 Open user guide when user is on Wiki");
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.WorkingWithWikis.html";

    /*
    - Connect to Intranet
    - Open Wiki application
     *Expected Outcome:
    - The Wiki page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    info("Click on Wiki");
    click(ELEMENT_WIKI_PAGE);
    waitForAndGetElement(ELEMENT_TITLE_WIKI_HOME_LINK);
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.WorkingWithWikis.html		*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /*
   * ==Display event quick result==
   * ID :104237
   * Step 1: search 3.5
   */
  @Test
  public void test02_DisplayEventQuickResult() {
    String eventName = "Gatein 35 party" + getRandomNumber();
    String researchWord = "35";
    String eventDescription =
        "Gatein 35 has been released! It's time to make a party! Enjoy some good sounds and good sushis!";
    String eventLocation = "Tatakis Suchis bar, San Francisco";
    String spaceName = "Engineering" + getRandomNumber();
    info("Test02 - Display Event quick result");

    /*
     * Pre conditions
     */
    magMember.goToMySpacePage();
    magMember.addNewSpace(spaceName, "");
    info("New space added : " + spaceName);
    click(spaceMag.ELEMENT_SPACE_CALENDAR_PORTLET);
    evt.addQuickEvent(
        eventName,
        eventDescription,
        getDate(1, "MM/dd/yyyy 20:00"),
        getDate(1, "MM/dd/yyyy 23:00"),
        false);
    evt.editEvent(
        eventName,
        eventName,
        eventDescription,
        eventLocation,
        getDate(1, "MM/dd/yyyy 20:00"),
        getDate(1, "MM/dd/yyyy 23:00"),
        false);
    info("New event " + eventName + " create");

    /*
     * Step 1 : In search input 3.5
     */
    Utils.pause(2000);
    click(ELEMENT_QUICK_SEARCH_ICON);
    Utils.pause(2000);
    type(ELEMENT_QUICK_SEARCH_TEXTBOX, researchWord, true);
    waitForAndGetElement(
        By.xpath(
            qsPage
                .ELEMENT_QUICK_SEARCH_BOX_RESULTS
                .replace("{$result}", eventName)
                .replace("{$position}", "1")));

    info("Delete all events and tasks");
    goToCalendarPage();
    goToView(selectViewOption.LIST);
    deleteAllTaskEvent();
  }
예제 #8
0
 @Test(groups = {"platform", "add new group"})
 public void testAddNewGroup() {
   System.out.println("--Create a new group--");
   magAcc.signIn(USER_ROOT, DATA_PASS);
   Utils.pause(1000);
   goToUsersAndGroupsManagement();
   Utils.pause(1000);
   userGroup.chooseGroupTab();
   Utils.pause(1000);
   userGroup.addGroup(groupName, groupLabel, groupDesc, verify);
   magAcc.signOut();
   Utils.pause(1000);
 }
 public void setPagePermission(String[] userGroup, int option) {
   info("Add user has permission default");
   if (isTextPresent("any")) {
     deletePagePermission("any");
   }
   waitForElementNotPresent(ELEMENT_PAGE_PERMISSION_POPUP);
   deletePagePermission("*:/spaces");
   waitForElementNotPresent(ELEMENT_PAGE_PERMISSION_POPUP);
   Utils.pause(2000);
   deletePagePermission("manager:/spaces");
   waitForElementNotPresent(ELEMENT_PAGE_PERMISSION_POPUP);
   Utils.pause(2000);
   addPagePermission(option, userGroup);
   waitForElementNotPresent(ELEMENT_PAGE_PERMISSION_POPUP);
 }
예제 #10
0
 @Test(groups = {"platform", "add new group"})
 public void testAddUserIntoGroup() {
   System.out.println("--Add user to a group--");
   magAcc.signIn(USER_ROOT, DATA_PASS);
   Utils.pause(1000);
   goToUsersAndGroupsManagement();
   Utils.pause(1000);
   userGroup.chooseGroupTab();
   Utils.pause(1000);
   userGroup.selectGroup(groupName);
   userGroup.addUsersToGroup(userName, memberShip, select, verify);
   Utils.pause(1000);
   magAcc.signOut();
   Utils.pause(1000);
 }
예제 #11
0
 @Test(groups = {"platform", "add new group"})
 public void testDeleteGroup() {
   System.out.println("--Delete a new group--");
   magAcc.signIn(USER_ROOT, DATA_PASS);
   Utils.pause(1000);
   goToUsersAndGroupsManagement();
   Utils.pause(1000);
   userGroup.chooseGroupTab();
   Utils.pause(1000);
   userGroup.selectGroup(groupName);
   userGroup.deleteGroup(groupName, true);
   Utils.pause(3000);
   magAcc.signOut();
   Utils.pause(1000);
 }
 @Test
 public void test05_SearchNodeTypeAll() {
   String keyword = "*";
   info("Search all node types");
   magNode.doNodeTypeSearch(keyword);
   Utils.captureScreen("test05_SearchNodeTypeAll");
 }
  /** == Display events with multiple day == Test case ID: 69111 */
  @Test
  public void test07_DisplayAnEventWithMultipeDay() {

    String Event = "Display events with multiple day";
    String Event_1 = "Display events with multiple day_1";
    String ELEMENT_VERITY_DATE_OLDER =
        "//*[contains(@class,'eventsList')]/li[2]//span[text()='${older_date_before}']/../../../../../li[2]//span[text()='${older_date_after}']";
    String ELEMENT_VERITY_DATE_LASTEST =
        "//*[contains(@class,'eventsList')]/li[1]//span[text()='${lastest_date_before}']/../../../../../li[2]//span[text()='${lastest_date_after}']";
    String older_date_before = getDate(-1, "M/dd/yyyy");
    String older_date_after = getDate(1, "M/dd/yyyy");
    String lastest_date_before = getDate(0, "M/dd/yyyy");
    String lastest_date_after = getDate(1, "M/dd/yyyy");

    info("Go to Calendar page");
    goToCalendarPage();
    info("Add events in calendar");
    event.addQuickEvent(Event, Event, getDate(-1, "M/dd/yyyy"), getDate(1, "M/dd/yyyy"), false);
    event.addQuickEvent(Event_1, Event_1, getDate(0, "M/dd/yyyy"), getDate(1, "M/dd/yyyy"), false);
    naviToolbar.goToHomePage();
    click(ELEMENT_CALENDAR_GADGET_TODAY_LABEL);
    waitForAndGetElement(ELEMENT_CALENDAR_GADGET_TODAY_LABEL);
    waitForAndGetElement(
        ELEMENT_VERITY_DATE_OLDER
            .replace("${older_date_before}", older_date_before)
            .replace("${older_date_after}", older_date_after));
    waitForAndGetElement(
        ELEMENT_VERITY_DATE_LASTEST
            .replace("${lastest_date_before}", lastest_date_before)
            .replace("${lastest_date_after}", lastest_date_after));
    Utils.pause(5000);
    goToCalendarPage();
    event.deleteEventTask(Event_1, selectDayOption.ONEDAY);
    event.deleteEventTask(Event, selectDayOption.ONEDAY);
  }
예제 #14
0
 @BeforeTest(groups = {"platform"})
 public void beforeTest() {
   driver = new FirefoxDriver();
   baseUrl = "http://localhost:8080";
   driver.get(baseUrl + "/portal/intranet/");
   Utils.pause(3000);
 }
예제 #15
0
 // View > Explorer templates
 public void goToExplorerTemplates() {
   if (isTextNotPresent("Explorer Templates")) {
     goToManageViews();
   }
   click(ELEMENT_TAB_EXPLORER_TEMPLATE);
   Utils.pause(500);
 }
  /**
   * Case ID:77797. Test Case Name: Remove the default value "What are you working on?". Created by
   * chinhdt at 2013/12/16 09:28:17
   */
  @Test
  public void test02_RemoveTheDefaultValueWhatAreYouWorkingOn() {
    info("Test 2: Remove the default value What are you working on?");

    /*Declare variables*/
    String text = "Test case2";
    String workingLabelText = "What are you working on?";
    String lighterColor = "rgba(51, 51, 51, 1)";

    /* Step 1: Connect to Intranet */
    // - Connect to Intranet
    info("----Add text into activity text box-----");
    WebElement inputText = waitForAndGetElement(home.ELEMENT_ACTIVITY_TEXTBOX);
    WebElement workingLabel = waitForAndGetElement(ELEMENT_ACTIVITY_WHAT_ARE_YOU_WORKING_LABEL);

    // Check color
    info("--Check content and color of default string--");
    Assert.assertEquals(workingLabel.getText(), workingLabelText);
    Assert.assertEquals(inputText.getCssValue("color"), lighterColor);

    /*Step 2: Input data in Shared Activity box */
    // ((JavascriptExecutor)driver).executeScript("arguments[0].textContent = '';", workingLabel);
    // ((JavascriptExecutor)driver).executeScript("arguments[0].textContent = '"+text+"';",
    // inputText);

    type(ELEMENT_ACTIVITY_WHAT_ARE_YOU_WORKING_LABEL, " ", false);
    type(home.ELEMENT_ACTIVITY_TEXTBOX, text, false);
    waitForElementNotPresent(ELEMENT_ACTIVITY_WHAT_ARE_YOU_WORKING_LABEL);
    Utils.pause(2000);
  }
  /**
   * Case ID:77777. Test Case Name: Can't share an empty message. Created by chinhdt at 2013/12/16
   * 09:28:17
   */
  @Test
  public void test01_CantShareAnEmptyMessage() {
    info("Test 1: Can't share an empty message");

    /*Declare variables*/
    String text1 = "       ";
    String text2 = "Test case1";

    /* Step 1: Don't type in shared activity box */
    // - Connect to Intranet
    // - Click in the composer input box, don't type
    info("----Add text into activity text box-----");
    WebElement inputText = waitForAndGetElement(home.ELEMENT_ACTIVITY_TEXTBOX);
    WebElement shareButton = waitForAndGetElement(ELEMENT_SHARE_BUTTON);

    Assert.assertEquals(shareButton.isEnabled(), false);

    /*Step 2: Input space characters into shared activity box */
    // - Input space characters into shared activity box
    ((JavascriptExecutor) driver)
        .executeScript("arguments[0].textContent = '" + text1 + "';", inputText);
    Assert.assertEquals(shareButton.isEnabled(), false);

    /* Step 3: Input letters into shared activity box */
    // - in put "a" character
    type(ELEMENT_ACTIVITY_WHAT_ARE_YOU_WORKING_LABEL, "   ", false);
    type(home.ELEMENT_ACTIVITY_TEXTBOX, text2, false);
    Utils.pause(1000);
    Assert.assertEquals(shareButton.isEnabled(), true);
    info("-- Verify Share button --");
  }
  /** CaseId 68892 -> Edit portal's config */
  @Test
  public void test04_EditPortalConfig() {
    String portalName = "Sniffportalnavigation04";
    String label = "sniff portal lable 04";
    String description = "sniff portal descriptrion 04";

    info("Add new portal");
    navTool.goToPortalSites();
    addNewPortal(
        portalName,
        null,
        null,
        null,
        null,
        "On Demand",
        true,
        null,
        "Platform /Content Management ",
        "*");
    waitForAndGetElement(ELEMENT_PORTAL.replace("${siteName}", portalName));

    info("Config portal");
    editPortal(
        portalName,
        label,
        description,
        "French",
        null,
        "Always",
        true,
        null,
        "Development ",
        "member");
    Utils.pause(1000);

    info("Check config portal successfully");
    goToEditSiteConfiguration(portalName);
    assert getValue(ELEMENT_PORTAL_LABEL).equalsIgnoreCase(label);
    assert getValue(ELEMENT_PORTAL_DESCRIPTION).equalsIgnoreCase(description);
    click(ELEMENT_PERMISSION_SETTING_TAB);
    click(ELEMENT_EDIT_PERMISSION_SETTING);
    waitForTextPresent("/developers");
    but.cancel();
    Utils.pause(1000);

    deletePortal(portalName);
  }
예제 #19
0
 /**
  * Restore original data by deleting a space
  *
  * @param spaceName
  * @param params
  */
 public void restoreData(String spaceName, int... params) {
   info("-- Restore Original Data --");
   int timeToDeleteSpace = params.length > 0 ? params[0] : DEFAULT_TIMEOUT;
   ;
   goToMySpacePage();
   deleteSpace(spaceName, timeToDeleteSpace);
   Utils.pause(500);
 }
  /** Qmetry ID: 102084 Check the same name when accessed via WEBDAV */
  @Test
  public void test02_CheckTheSameNameWhenAccessedViaWEBDAV() {
    String filePath = "TestData/test.txt";
    By eFile = By.xpath(siteExp.ELEMENT_DOCUMENT_TITLE.replace("${title}", "test.txt"));
    String newFileName = "rename02";
    By editFile =
        By.xpath(siteExp.ELEMENT_DOCUMENT_TITLE.replace("${title}", newFileName + ".txt"));

    info("-- Test case: Check the same name when accessed via WEBDAV --");

    // Go to Personal Drive
    navToolBar.goToPersonalDocuments();
    magDrv.addView2Drive("Web", "Personal Documents");
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);

    // Test Data > Upload a file: filename.txt
    // ecms.uploadFile(filePath);
    if (waitForAndGetElement(ecms.ELEMENT_ACTION_BAR_UPLOAD_BTN, DEFAULT_TIMEOUT, 2000, 0)
        == null) {
      info("click on More link");
      click(ecms.ELEMENT_MORE_LINK_WITHOUT_BLOCK);
      info("click upload button");
      click(ecms.ELEMENT_ACTION_BAR_UPLOAD_BTN);
    } else click(ecms.ELEMENT_ACTION_BAR_UPLOAD_BTN);
    uploadFileUsingRobot(filePath);

    // Rename a file
    // cMenu.contextMenuAction(eFile, cMenu.ELEMENT_MENU_RENAME_NODE, newFileName);
    // right click on eFile
    rightClickOnElement(eFile);

    // Rename a file and click [Cancel Button]
    waitForAndGetElement(cMenu.ELEMENT_MENU_RENAME_NODE, 3000);
    click(cMenu.ELEMENT_MENU_RENAME_NODE, 3000);
    type(cMenu.ELEMENT_INPUT_RENAME_NODE, newFileName, true);
    button.rename();
    waitForAndGetElement(editFile);

    // View information
    cMenu.contextMenuAction(editFile, cMenu.ELEMENT_VIEW_INFORMATION);
    waitForAndGetElement(
        cMenu.ELEMENT_POPUP_VIEW_INFORMATION_NAME.replace("${fileName}", newFileName + ".txt"));
    button.close();

    // Download and Allow Edition
    cMenu.contextMenuAction(editFile, cMenu.ELEMENT_MENU_DOWNLOAD);
    switchToNewWindow();

    // The url of the browser should end by rename02.txt
    String fileName = Utils.getFileNameFromCurrentUrl(driver);
    assert fileName.equals(newFileName + ".txt")
        : "Failed: check the same name when accessed via WEBDAV";

    // Restore data
    switchToParentWindow();
    cMenu.deleteDocument(editFile);
  }
예제 #21
0
 @Test(groups = {"platform", "add new group"})
 public void testSelectAndEditGroup() {
   System.out.println("--Edit a new group--");
   magAcc.signIn(USER_ROOT, DATA_PASS);
   Utils.pause(1000);
   goToUsersAndGroupsManagement();
   Utils.pause(1000);
   userGroup.chooseGroupTab();
   Utils.pause(1000);
   userGroup.selectGroup(groupName);
   // userGroup.editGroup(groupName, true);
   type(ELEMENT_INPUT_LABEL, "", true);
   type(ELEMENT_TEXTAREA_DESCRIPTION, "edit a group description", true);
   button.save();
   Utils.pause(1000);
   magAcc.signOut();
   Utils.pause(1000);
 }
예제 #22
0
 /**
  * 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);
 }
  /**
   * Case ID:76671. Test Case Name: Open user guide when user is inside a space, on Forum.
   * Pre-Condition: The current user is a member of a space with Forum application Post-Condition:
   * Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test13_OpenUserGuideWhenUserIsInsideASpaceOnForum() {
    info("Test 13 Open user guide when user is inside a space, on Forum");
    String spaceName = "Space" + getRandomNumber();
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.BuildingYourForum.html";

    // Pre-condition
    mMember.goToAllSpaces();
    mMember.addNewSpace(spaceName, spaceName);
    Utils.pause(1000);

    /*
    - Connect to Intranet
    - Open a space, go to forum
     *Expected Outcome:
    - The forum screen is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    mMember.goToSpaceMenu("Forums");
    Utils.pause(1000);
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.BuildingYourForum.html		*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());

    // Delete data test
    switchToParentWindow();
    mMember.goToAllSpaces();
    mMember.deleteSpace(spaceName, 300000);
  }
  /**
   * Case ID:76677. Test Case Name: Open user guide when user is on FAQ. Pre-Condition:
   * Post-Condition: Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55 Bug:
   * https://jira.exoplatform.org/browse/PLF-4516
   */
  @Test
  public void test19_OpenUserGuideWhenUserIsOnFAQ() {
    info("Test 19 Open user guide when user is on FAQ");
    String URL = "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.html";
    String nodeName = "Node" + getRandomNumber();
    String displayName = "Node" + getRandomNumber();
    String title = "Collaboration";
    Map<String, String> portletIds = new HashMap<String, String>();
    portletIds.put("Collaboration/FAQPortlet", "");

    // Pre-condition
    nav.goToPageCreationWizard();
    Utils.pause(5000);
    click(ELEMENT_UP_LEVEL);
    info("Create page");
    mPage.addNewPageEditor(nodeName, displayName, "", title, portletIds, false, false);
    Utils.pause(5000);

    /*
    - Connect to Intranet
    - OpenFAQ application
     *Expected Outcome:
    - TheFAQ page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF41/PLFUserGuide.BuildingYourAnswers.html		*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    driver.navigate().to(URL);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
예제 #25
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);
 }
예제 #26
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);
 }
예제 #27
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);
  }
  /**
   * Case ID:76667. Test Case Name: Open user guide when user is inside a space, on Answers.
   * Pre-Condition: The current user is a member of a space with Answers application Post-Condition:
   * Done with OSs and browsers : Generated by chinhdtt at 2014/05/19 12:12:55
   */
  @Test
  public void test09_OpenUserGuideWhenUserIsInsideASpaceOnAnswers() {
    info("Test 9: Open user guide when user is inside a space, on Answers");
    String spaceName = "Space" + getRandomNumber();
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/eXoAddonsGuide.Answers.UserGuide.html";

    // Pre-condition
    mMember.goToAllSpaces();
    mMember.addNewSpace(spaceName, spaceName);
    Utils.pause(1000);

    /*
    - Connect to Intranet
    - Open a space, go to Answers
     *Expected Outcome:
    - The Answers screen is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    mMember.addApplication(spaceName, "Collaboration", typeApplications.Answer);
    mMember.goToSpaceMenu("Answer");
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/eXoAddonsGuide.Answers.UserGuide.html*/
    click(ELEMENT_HELP_ICON);
    info("Check URL is shown");
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
    info("URL " + driver.getCurrentUrl());
  }
  /**
   * Case ID:76674. Test Case Name: Open user guide when user is on Answers. Pre-Condition: Create a
   * page containing answer portlet Post-Condition: Done with OSs and browsers : Generated by
   * chinhdtt at 2014/05/19 12:12:55 Bug: https://jira.exoplatform.org/browse/PLF-4516
   */
  @Test
  public void test16_OpenUserGuideWhenUserIsOnAnswers() {
    info("Test 16 Open user guide when user is on Answers");
    // String URL =
    // "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/PLFUserGuide.BuildingYourAnswers.html";
    String URL =
        "http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/eXoAddonsGuide.Answers.UserGuide.html";
    Map<String, String> portletIds = new HashMap<String, String>();
    portletIds.put("Collaboration/AnswersPortlet", "");

    // Pre-condition
    click("//*[@data-original-title='Answers']");

    /*
    - Connect to Intranet
    - Open Answers application
     *Expected Outcome:
    - TheAnswers page is displayed
    - The Top navigation bar is displayed
    - The Help button is displayed in the right of the bar		*/
    info("Check top navigation bar");
    waitForAndGetElement(ELEMENT_NAVIGATION_TOOLBAR_HOMEPAGE);
    waitForAndGetElement(ELEMENT_HELP_ICON);

    /*
    - Click on the button "?"
     *Input Data:
     *Expected Outcome:
    - A new tab in the internet browser is opened
    - The user guide is opened on: http://docs.exoplatform.com/public/index.jsp?topic=/PLF42/eXoAddonsGuide.Answers.UserGuide.html*/
    click(ELEMENT_HELP_ICON);
    Utils.pause(5000);
    for (String winHandle : driver.getWindowHandles()) {
      driver.switchTo().window(winHandle);
    }
    Utils.pause(1000);
    info("Current URL " + driver.getCurrentUrl());
    info("URL expected:" + URL);
    assert driver.getCurrentUrl().equalsIgnoreCase(URL);
  }
예제 #30
0
  /**
   * Create a new space
   *
   * @param name
   * @param desc
   * @param visibility
   * @param registration
   * @param groupPath
   * @param childGroupName
   * @param params
   */
  public void addNewSpace(
      String name,
      String desc,
      String visibility,
      String registration,
      String groupPath,
      String childGroupName,
      int... params) {
    info("-- Adding a new space --");
    int iTimeout = params.length > 0 ? params[0] : DEFAULT_TIMEOUT;
    if (waitForAndGetElement(ELEMENT_ADDNEWSPACE_BUTTON, 3000, 0, 2) != null) {
      clickByJavascript(ELEMENT_ADDNEWSPACE_BUTTON);
    } else {
      clickByJavascript(By.cssSelector("i[class ~= 'uiIconSocSimplePlus']"));
    }

    waitForAndGetElement(ELEMENT_ADDNEWSPACE_FORM);
    type(ELEMENT_SPACE_NAME_INPUT, name, true);
    type(ELEMENT_SPACE_DESCRIPTION_INPUT, desc, true);
    switchTabs(ELEMENT_ACCESS_TAB);

    if (visibility != "") {
      info("-- Set visibility --");
      if (visibility.equals("Visible")) {
        check(ELEMENT_ACCESS_EDIT_VISIBLE, 2);
      } else if (visibility.equals("Hidden")) {
        check(ELEMENT_ACCESS_EDIT_HIDDEN, 2);
      }
    }

    if (registration != "") {
      info("-- Set Registration --");
      if (registration.equals("Open")) {
        check(ELEMENT_ACCESS_EDIT_REGISTRATION_OPEN, 2);
      } else if (registration.equals("Validation")) {
        check(ELEMENT_ACCESS_EDIT_REGISTRATION_VALIDATION, 2);
      } else if (registration.equals("Close")) {
        check(ELEMENT_ACCESS_EDIT_REGISTRATION_CLOSE, 2);
      }
    }

    if (groupPath != "" && childGroupName != "") {
      switchTabs(ELEMENT_USER_GROUP_TAB);
      addUserGroupToInvite(groupPath, childGroupName);
    }
    clickButton("Create");
    waitForAndGetElement(By.linkText(name), iTimeout);
    waitForElementNotPresent(ELEMENT_ADDNEWSPACE_FORM);
    Utils.pause(1000);
    // waitForElementPresent(By.xpath("//div[contains(@class,'UISpaceName')]/a[@title='"
    // + name + "']"), iTimeout);
  }