/*
   * CaseId 77702: Post an activity with "My Spaces" filter selected
   * CaseId 77706: Comment from "My Spaces"
   * Precondition: Space1 is already exist.
   */
  @Test
  public void test02_ActivityComment_MySpacesFilter() {
    String activity = "My Spaces filter: Post an activity.";
    String spaceName = "Space77702";
    String comment = "My Spaces filter: Comment for an activity.";

    // Create data for Pre-Conditions
    spaceMag.goToMySpacePage();
    spaceMag.addNewSpace(spaceName, "");

    // Start test case
    naviToolbar.goToHomePage();

    // Step1: My Spaces filter is displayed
    selectFileter("My Spaces");

    // Add an activity in Space1
    click(By.linkText(spaceName));
    addActivity(true, activity, false, "");

    // Go to Home, select All Activities filter
    naviToolbar.goToHomePage();
    selectFileter("All Activities");

    // Step2: Add a comment
    addComment(activity, comment);

    // Select My Spaces filter
    selectFileter("My Spaces");

    // Delete activity before exit test cases
    hpActivity.deleteActivity(activity);
    spaceMag.goToMySpacePage();
    spaceMag.deleteSpace(spaceName, 300000);
  }
コード例 #2
0
ファイル: Gatein_Dashboard.java プロジェクト: khanhnt/ui-test
  /** CaseId: 68859 Change container when edit layout for user's page */
  @Test
  public void test04_ChangeContainerWhenEditLayoutUserPage() {
    String pageName = "gateinsniff04";
    String title = "Row1";

    navTool.goToDashboard();
    pageE.createNewPageEmptyLayout(pageName);
    navTool.goToEditPageEditor();

    info("Add container");
    pageE.addNewContainer("Rows Layout", "oneRow");
    waitForAndGetElement(ELEMENT_DROP_TARGET_HAS_LAYOUT);
    click(ELEMENT_SWITCH_VIEW_MODE);
    waitForAndGetElement(ELEMENT_DROP_TARGET_HAS_LAYOUT);
    click(ELEMENT_SWITCH_VIEW_MODE);

    info("Edit container");
    mouseOver(ELEMENT_DROP_TARGET_HAS_LAYOUT, true);
    click(ELEMENT_EDIT_CONTAINER_ICON);
    type(ELEMENT_CONTAINER_TITLE, title, true);
    but.save();
    mouseOver(ELEMENT_DROP_TARGET_HAS_LAYOUT, true);
    waitForAndGetElement("//*[@class='UIRowContainer']//span[text()='" + title + "']");

    info("Delete container");
    pageE.removeContainer(ELEMENT_DROP_TARGET_HAS_LAYOUT, ELEMENT_DELETE_CONTAINER_ICON);
    waitForElementNotPresent(ELEMENT_DROP_TARGET_HAS_LAYOUT);
    click(ELEMENT_PAGE_FINISH_BUTTON);
    waitForElementNotPresent(ELEMENT_PAGE_FINISH_BUTTON, 60000);

    deleteTabOnDashboard(pageName);
  }
コード例 #3
0
  /**
   * == Add File activity after uploading a file in CE == Test case ID: 77327 Step 1: - Go to Sites
   * explorer (except personal drive) - Upload a file - Back to the Home page
   */
  @Test
  public void test11_AddFileActivityAfterUploadingAFileInCE() {
    // Declare variable
    String file = "KS_Wiki_Attachment_pdffile.pdf";
    By elementfile = By.linkText(file);

    // Go to SE
    navToolBar.goToSiteExplorer();

    // Upload a file: image, pdf or office document (except personal document drive)
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", "");

    /*Clear data*/
    info("-- Clear data --");
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementfile);
  }
コード例 #4
0
  /** CaseId: 68885 + 68887 + 68886 -> Add, switch sites and delete site */
  @Test
  public void test01_AddDeletePortal() {
    String portalName = "gateinsniffportal01";

    info("Add new portal");
    Map<String, String> permissions = null;
    String editGroupId = "Platform /Content Management ";
    String editMembership = "*";
    navTool.goToPortalSites();
    addNewPortal(
        portalName,
        null,
        null,
        "French",
        null,
        "Always",
        true,
        permissions,
        editGroupId,
        editMembership);
    waitForAndGetElement("//*[@class='siteName' and text()='" + portalName + "']");

    info("Switch to new portal");
    driver.get("http://*****:*****@src, 'sites/" + portalName + "')]");

    info("Delete portal");
    driver.get(baseUrl);
    navTool.goToPortalSites();
    deletePortal(portalName);
  }
コード例 #5
0
  /**
   * == Not update File activity after creating a new folder == Test case ID: 76991 Step 1: -
   * Connect to Intranet - Open Sites Explorer - Create a new folder - Back to the Home page
   */
  @Test
  public void test01_NotUpdateFileActivityAfterCreatingANewFolder() {
    // Declare variable
    String folder = "folder01";
    By elementFolder = By.linkText(folder);
    // Open Sites Explorer
    info("-- Open Sites Explorer --");
    navToolBar.goToSiteExplorer();

    // Create a new folder
    info("-- Create parent folder --");
    cTemplate.createNewFolder(folder, folderType.None);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // No activity is displayed in the activity stream
    info("-- Check activity after adding a folder --");
    waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", folder));

    /*Clear data*/
    info("-- Clear data --");
    info("-- Open Sites Explorer --");
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementFolder);
  }
コード例 #6
0
ファイル: Gatein_Dashboard.java プロジェクト: khanhnt/ui-test
  /** CaseId: 68860 Change application when edit layout for user's page */
  @Test
  public void test00_ChangeAppWhenEditingPageLayout() {
    String pageName = "gateinsniff05";

    navTool.goToDashboard();
    pageE.createNewPageWithLayout(pageName, 2);
    navTool.goToEditPageEditor();

    info("Add new application to page");
    addContentListPortletForPage();
    click(ELEMENT_SWITCH_VIEW_MODE);

    info("Edit portlet");
    pageE.selectCLVPath("General Drives/Sites Management/acme", "documents");
    click(ELEMENT_SWITCH_VIEW_MODE);
    waitForTextPresent("offices.jpg");
    waitForTextPresent("metro.pdf");
    waitForTextPresent("conditions.doc");
    click(ELEMENT_SWITCH_VIEW_MODE);

    info("Move portlet to row 2");
    pageE.movePortletOnContainer(
        ELEMENT_FRAME_CONTAIN_PORTLET,
        By.xpath("//*[text()='Content List']/..//*[@class='uiIconDragDrop uiIconWhite']"),
        ELEMENT_DROP_TARGET_HAS_LAYOUT);

    info("Delete portlet");
    pageE.removePortlet(ELEMENT_FRAME_CONTAIN_PORTLET, ELEMENT_DELETE_PORTLET_ICON);
    waitForTextNotPresent("Sorry, no articles are available.");
    waitForTextNotPresent("offices.jpg");

    deleteTabOnDashboard(pageName);
  }
コード例 #7
0
  /**
   * == Edit a file from the File activity from intranet home page == Test case ID: 76997 Step 1:
   * Create file activity Step 2: Edit file from activity stream
   */
  @Test
  public void test05_EditAFileFromTheFileActivityFromIntranetHomePage() {
    // Declare variable
    String file = "KS_Wiki_Attachment_pdffile.pdf";
    By elementfile = By.linkText(file);

    /*Step 1: Create file activity*/
    // Go to SE
    navToolBar.goToSiteExplorer();

    // Upload a file
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", "");

    /*Step 2: Edit file from activity stream*/
    // From the file activity, click on the link "Edit"
    info("Click Edit icon in activity");
    activity.goToEditFromContentActivity(file);
    assert getValue(cTemplate.ELEMENT_WEBCONTENT_NAME_TEXTBOX).equalsIgnoreCase(file);
    activity.backToHomePageFromEditContentScreen();

    /*Clear data*/
    info("-- Clear data --");
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementfile);
  }
コード例 #8
0
  /**
   * == Displaying of file format (image, pdf, office) in the File activity (1) == Test case ID:
   * 76994 Step 1: - Connect to Intranet - Go to SE and Upload a file: image, pdf or office document
   * (except personal document drive) - Go back intranet home page PENDING: check preview of the
   * file is displayed (only first page for documents) Refer:
   * https://jira.exoplatform.org/browse/FQA-1250
   */
  @Test(groups = {"pending"})
  public void test03_DisplayingOfFileFormatImagePdfOfficeInTheFileActivity1() {
    // Declare variable
    String file = "KS_Wiki_Attachment_pdffile.pdf";
    By elementfile = By.linkText(file);

    // Go to SE
    navToolBar.goToSiteExplorer();

    // Upload a file: image, pdf or office document (except personal document drive)
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", "");

    // - A preview of the file is displayed (only first page for documents)

    /*Clear data*/
    info("-- Clear data --");
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementfile);
  }
  /** CaseId: 70587 -> Move application when edit layout for portal's page */
  @Test
  public void test05_MoveAppWhenEditLayout_PortalPage() {
    String pageName = "Sniffportalnavigation05";
    String ELEMENT_PORTLET_1 = "//*[contains(@id, 'UIPortlet')][1]";
    String ELEMENT_PORTLET_2 = "//*[contains(@id, 'UIPortlet')][2]";

    info("Create new page with application");
    navTool.goToPageCreationWizard();
    Map<String, String> portal = new HashMap<String, String>();
    portal.put("Collaboration/AnswersPortlet", "Collaboration/WikiPortlet");
    pageMag.addNewPageEditor(pageName, "", null, "Collaboration", portal, false, false);

    navTool.goToEditPageEditor();
    waitForAndGetElement(ELEMENT_PORTLET_1 + "//div[contains(text(),'Wiki Portlet')]");
    mouseOver(ELEMENT_PORTLET_2, true);
    if (this.plfVersion.contains("4.0"))
      dragAndDropToObject(ELEMENT_PORTLET_2 + ELEMENT_PORTLET_DRAG_DROP_ICON, ELEMENT_PORTLET_1);
    else
      dragAndDropToObject(
          ELEMENT_PORTLET_2 + ELEMENT_PORTLET_DRAG_DROP_ICON_PLF41, ELEMENT_PORTLET_1);
    waitForAndGetElement(ELEMENT_PORTLET_1 + "//div[contains(text(),'Answers Portlet')]");
    click(ELEMENT_SWITCH_VIEW_MODE);
    waitForAndGetElement(ELEMENT_PORTLET_2 + "//*[@id='UIWikiPortlet']");
    click(ELEMENT_SWITCH_VIEW_MODE);
    pageE.finishEditLayout();

    info("Delete page");
    pageMag.deletePageAtManagePageAndPortalNavigation(pageName, true, "intranet", false, null);
  }
  /**
   * CaseId: 70588 + 70589 + 70590 -> Add, edit, remove application when edit layout for portal's
   * page
   */
  @Test
  public void test06_AddEditRemoveAppWhenEditLayout_PortalPage() {
    String pageName = "Sniffportalnavigation06";

    info("Create new page of portal with empty layout and applications");
    pageE.createNewPageEmptyLayout(pageName);

    info("Add application when edit layout of page");
    navTool.goToEditPageEditor();
    click(By.linkText("Content"));
    dragAndDropToObject(ELEMENT_CONTENTS_LIST_VIEWER_PORTLET, ELEMENT_DROP_TARGET_NO_LAYOUT);
    click(ELEMENT_SWITCH_VIEW_MODE);
    waitForAndGetElement(ELEMENT_CLV_PORTLET);
    click(ELEMENT_SWITCH_VIEW_MODE);
    pageE.finishEditLayout();

    info("Edit application when edit layout of page");
    navTool.goToEditPageEditor();
    pageE.selectCLVPath("General Drives/Sites Management/acme", "documents");
    click(ELEMENT_SWITCH_VIEW_MODE);
    waitForTextPresent("offices.jpg");
    waitForTextPresent("metro.pdf");
    waitForTextPresent("conditions.doc");
    click(ELEMENT_SWITCH_VIEW_MODE);
    pageE.finishEditLayout();

    info("Remove application when edit layout of page");
    navTool.goToEditPageEditor();
    pageE.removePortlet(ELEMENT_FRAME_CONTAIN_PORTLET, ELEMENT_DELETE_PORTLET_ICON);
    waitForElementNotPresent(ELEMENT_CLV_PORTLET);

    info("Delete page");
    pageMag.deletePageAtManagePageAndPortalNavigation(pageName, true, "intranet", false, null);
  }
コード例 #11
0
  /**
   * == Remove the File activity after deleting a file in Content explorer == Test case ID: 77000
   * Step 1: Create file activity Step 2: Delete File
   */
  @Test
  public void test06_RemoveTheFileActivityAfterDeletingAFileInContentExplorer() {
    // Declare variable
    String file = "KS_Wiki_Attachment_pdffile.pdf";
    By elementfile = By.linkText(file);

    /*Step 1: Create file activity*/
    // Go to SE
    navToolBar.goToSiteExplorer();

    // Upload a file
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", "");

    /*Step 2: Delete File*/
    // Delete the file
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementfile);

    // Back to the Homepage
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is removed from the activity stream
    info("-- The File activity is removed from the activity stream --");
    waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", file));
  }
コード例 #12
0
  /** Qmetry ID: 65855 Unlock a Node ================ */
  @Test
  public void test01_UnlockNode() {
    String fileTitle = "Ecms_Admin_Unlock_Node";
    String content = "Unlock A Node In Content Administration";
    By eLockedFile = By.xpath(cMenu.ELEMENT_FILE_TITLE.replace("${titleOfFile}", fileTitle));
    String elementLockedArticleIcon =
        cMenu.ELEMENT_FILE_LOCKED_BY_ADMIN.replace("${titleOfFile}", fileTitle);

    info("-- Test case: Unlock a node --");

    // Go to Site Explorer
    nav.goToSiteExplorer();
    // actBar.goToSitesManagement();
    ecms.goToNode("intranet/documents");

    // Create a new File
    actBar.goToAddNewContent();
    cTemplate.createNewFile(fileTitle, content, fileTitle);

    // Lock this File
    cMenu.contextMenuAction(eLockedFile, cMenu.ELEMENT_CONTEXT_MENU_LOCK);
    click(cMenu.ELEMENT_DOCUMENT);
    waitForAndGetElement(elementLockedArticleIcon);

    // Unlock Node in Admin
    ecMain.goToLockedTab();
    click(ecMain.ELEMENT_UNLOCK_NODE.replace("${lockedNode}", fileTitle));
    waitForElementNotPresent(ecMain.ELEMENT_UNLOCK_NODE.replace("${lockedNode}", fileTitle));

    info("-- Restore data --");
    nav.goToSiteExplorer();
    cMenu.deleteDocument(eLockedFile);
  }
コード例 #13
0
  /** 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);
  }
コード例 #14
0
  /**
   * == Remove the File activity after deleting a file in Space document == Test case ID: 77326 Step
   * 1: Create file activity Step 2: Delete File
   */
  @Test
  public void test10_RemoveTheFileActivityAfterDeletingAFileInSpaceDocument() {
    // Declare variable
    String file = "KS_Wiki_Attachment_pdffile.pdf";
    By elementfile = By.linkText(file);
    String spacename = "Space10";
    String spacedesc = "Description Of Space10";

    /*Step 1: Create file activity*/
    // Add new space
    magMember.goToMySpacePage();
    magMember.addNewSpace(spacename, spacedesc);

    // Open Documents in this space
    waitForAndGetElement(magMember.ELEMENT_DOCUMENTS_TAB);
    click(magMember.ELEMENT_DOCUMENTS_TAB);

    // Upload a file
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", "");

    /*Step 2: Delete File*/
    // Delete file from space
    magMember.goToMySpacePage();
    magMember.doAction("Edit", spacename);
    waitForAndGetElement(magMember.ELEMENT_DOCUMENTS_TAB);
    click(magMember.ELEMENT_DOCUMENTS_TAB);
    cMenu.deleteData(elementfile);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // The File activity is removed from the activity stream
    info("-- The File activity is removed from the activity stream --");
    waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", file));

    /*Clear data*/
    info("-- Clear data --");
    magMember.goToMySpacePage();
    magMember.deleteSpace(spacename);
  }
コード例 #15
0
  /**
   * == Displaying of file format (image, pdf, office) in the File activity (2) == Test case ID:
   * 77112 Step 1: - Connect to Intranet - Go to CE and Upload a file: image, pdf or office document
   * (except personal document drive) - Go back intranet home page Verify by comparison width heigh
   * and width: The orientation of the file can be portrait or landscape following its original
   * orientation
   */
  @Test
  public void test08_DisplayingOfFileFormatImagePdfOfficeInTheFileActivity2() {
    // Declare variable
    String file1 = "portrait08.jpg";
    String file2 = "landscape08.jpg";
    By elementfile1 = By.linkText(file1);
    By elementfile2 = By.linkText(file2);

    // Go to SE
    navToolBar.goToSiteExplorer();

    // Upload a file: image, pdf or office document (except personal document drive)
    ecms.uploadFile("TestData/" + file1);
    ecms.uploadFile("TestData/" + file2);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - The File activity is displayed in the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file1, "", "File", "", "", "", "", "");
    activity.checkInforAfterAddingDocument(file2, "", "File", "", "", "", "", "");

    // - The orientation of the file can be portrait or landscape following its original orientation
    WebElement element =
        waitForAndGetElement(By.xpath(ELEMENT_GET_URL_IMAGE.replace("${name}", file1)));
    String src = element.getAttribute("src");
    driver.navigate().to(src);
    WebElement image =
        waitForAndGetElement(By.xpath(ELEMENT_GET_URL_IMAGE.replace("${name}", src)));
    int height = image.getSize().getHeight();
    assert (height == 300);

    driver.navigate().back();
    element = waitForAndGetElement(By.xpath(ELEMENT_GET_URL_IMAGE.replace("${name}", file2)));
    src = element.getAttribute("src");
    driver.navigate().to(src);
    image = waitForAndGetElement(By.xpath(ELEMENT_GET_URL_IMAGE.replace("${name}", src)));
    height = image.getSize().getHeight();
    assert (height == 89);
    driver.navigate().back();

    /*Clear data*/
    info("-- Clear data --");
    navToolBar.goToSiteExplorer();
    cMenu.deleteData(elementfile1);
    cMenu.deleteData(elementfile2);
  }
コード例 #16
0
ファイル: Gatein_Dashboard.java プロジェクト: khanhnt/ui-test
  /** CaseId: 68861 Add application into container when edit layout for user's page */
  @Test
  public void test06_AddAppIntoContainerWhenEditingPageLayout() {
    String pageName = "gateinsniff06";

    navTool.goToDashboard();
    pageE.createNewPageWithLayout(pageName, 2);
    navTool.goToEditPageEditor();

    info("Add new application to page");
    addContentListPortletForPage();
    click(ELEMENT_PAGE_FINISH_BUTTON);
    waitForElementNotPresent(ELEMENT_PAGE_FINISH_BUTTON, 60000);

    deleteTabOnDashboard(pageName);
  }
  /**
   * == Share an uploaded file == == Upload a new file from "Select File" pop up == Test case ID:
   * 78684, 77812, 77820 Step 1: Open [Select file] popup Step 2: Open window for browse file Step
   * 3: Select a file Step 4: Share an uploaded file
   */
  @Test
  public void test11_ShareAnUploadedFile() {
    /*Declare variables*/
    String uploadFileName = "ECMS_DMS_SE_Upload_pdffile.pdf";
    String folder = "folder77811";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";
    /* Step 1: Open [Select file] popup */
    // - Connect to Intranet
    // - From the [Activity Composer] box, click on [File] button
    // - Select a drive from [Select drive] list
    // The popup [Select file] is shown
    /* Step 2: Open window for browse file */
    // - Click on a folder
    // - Click on the icon [Upload]
    // The window to upload from desktop is displayed
    /* Step 3: Select a file */
    // - Double click a file from local
    // - The file upload is showing the progress
    // - It displays the file name and the file's type icon
    /* Step 4: Share an uploaded file */
    // - Double click this file
    // - Click on the button [Share]
    // This file is shared
    selectFile(driverName, true, folderPath, "", uploadFileName, folder);

    // Clear data
    activity.deleteActivity(uploadFileName);
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder, actionType.DELETE, true, true);
  }
  /**
   * == Select a file by a simple click == Test case ID: 77802 Step 1: Open [Select File] popup Step
   * 2: Select a file by double-clicking
   */
  @Test
  public void test09_SelectAFileByASimpleClick() {
    /*Declare variables*/
    String uploadFileName = "ECMS_DMS_SE_Upload_pdffile.pdf";
    String folder = "folder77802";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer] box, click on [File]
    // - The pop up [Select File] is displayed
    /* Step 2: Select a file by clicking */
    // - Select a drive from [Select Drive] list
    // - Click on a folder, do this until there is a file in the current folder
    selectFile(driverName, true, folderPath, "", uploadFileName, folder);
    goToFolderPath(driverName, folderPath);

    // - Click on that file
    click(By.linkText(uploadFileName));

    // The name of the file is shown in the breadcrumb
    waitForAndGetElement(ecms.ELEMENT_BREADCUMBSCONTAINER.replace("${fileName}", uploadFileName));
    button.closeWindow();
    waitForElementNotPresent(ELEMENT_SELECT_FILE_POPUP);

    // Clear data
    activity.deleteActivity(uploadFileName);
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder, actionType.DELETE, true, true);
  }
  // @Test (groups="error")
  public void test08_OpenSelectFilePopup() {
    /*Declare variables*/
    String uploadFileName = "ECMS_DMS_SE_Upload_pdffile.pdf";
    String folder = "folder77783";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer] box, click on [File]
    // - The pop up [Select File] is displayed
    /* Step 2: Select a file by double-clicking */
    // - Select a drive from [Select Drive] list
    // - Click on a folder, do this until there is a file in the current folder
    // - Double click on that file
    selectFile(driverName, true, folderPath, "", uploadFileName, folder);
    goToFolderPath(driverName, folderPath);
    doubleClickOnElement(By.linkText(uploadFileName));

    // The file is selected and the pop up is closed
    waitForElementNotPresent(ELEMENT_SELECT_FILE_POPUP);
    // Clear data
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder, actionType.DELETE, true, true);
  }
  /**
   * == Display the breadcrumb of the path == Test case ID: 77788 Step 1: Open [Select File] popup
   * Step 2: Browse folders REFER: https://jira.exoplatform.org/browse/COMMONS-259
   */
  @Test(groups = "error")
  public void test04_DisplayTheBreadcrumbOfThePath() {
    /*Declare variables*/
    String folder1 = "folder777881";
    String folder2 = "folder777882";
    String folder3 = "folder777883";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer] box, click on [File]
    // - The pop up [Select File] is displayed
    /* Step 2: Browse folders */
    // - Select a drive from the list [Select Drive]
    // - Click on a folder (called "folder 1"), then click on the sub-folder (call "sub folder 2"],
    // then click on its sub-folder (ex sub-folder 3)
    // - The current position in the browsed drive is displayed in breadcrumb
    // -  Only the folder of the path's root level, plus sub-folder 2, sub-folder 3. the folder 1 is
    // not shown
    selectFile(driverName, false, folderPath, "", "", folder1, false);
    button.closeWindow();
    selectFile(driverName, false, folderPath + "/" + folder1, "", "", folder2, false);
    button.closeWindow();
    selectFile(
        driverName, false, folderPath + "/" + folder1 + "/" + folder2, "", "", folder3, false);
    button.closeWindow();
    goToFolderPath(driverName, folderPath + "/" + folder1 + "/" + folder2 + "/" + folder3, true);
    button.cancel();

    // Clear data
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder1, actionType.DELETE, true, true);
  }
  /**
   * == Display the breadcrumb of a very long path == Test case ID: 77785 Step 1: Open [Select File]
   * popup Step 2: Add a folder with a long name
   */
  @Test
  public void test03_DisplayTheBreadcrumbOfAVeryLongPath() {
    /*Declare variables*/
    String folder = "this is a long sub-folder 77783";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer] box, click on [File]
    // - The pop up [Select File] is displayed
    /* Step 2: Add a folder with a long name */
    // - Select a drive from the list [Select Drive]
    // - Click on a folder,
    // - Then click on its sub-folder
    // - Click on icon [New folder]
    // - Input into fields (ex "this is a long sub-folder 3")
    // - Click [OK]
    // - A folder with a long name is created
    selectFile(driverName, false, folderPath, "", "", folder, false);
    button.closeWindow();

    // Clear data
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder, actionType.DELETE, true, true);
  }
コード例 #22
0
ファイル: ECMainFunction.java プロジェクト: khanhnt/ui-test
 // 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);
 }
コード例 #23
0
ファイル: ECMainFunction.java プロジェクト: khanhnt/ui-test
 /////////////////
 // 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);
 }
コード例 #24
0
ファイル: ECMainFunction.java プロジェクト: khanhnt/ui-test
 // 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);
 }
コード例 #25
0
  /**
   * == Add File activity after uploading a file in a space == Test case ID: 76992 Step 1: - Connect
   * to Intranet - Add new space - Open Documents in this space - Upload a file - Back to the Home
   * page
   */
  @Test
  public void test02_AddFileActivityAfterUploadingAFileInASpace() {
    // Declare variable
    String spacename = "Space02";
    String spacedesc = "Description Of Space02";
    String file = "ECMS_DMS_SE_Upload_imgfile.jpg";

    // Add new space
    magMember.goToMySpacePage();
    magMember.addNewSpace(spacename, spacedesc);

    // Open Documents in this space
    waitForAndGetElement(magMember.ELEMENT_DOCUMENTS_TAB);
    click(magMember.ELEMENT_DOCUMENTS_TAB);

    // Upload a file
    ecms.uploadFile("TestData/" + file);

    // Back to the Home page
    info("-- Back to the Home page --");
    navToolBar.goToHomePage();

    // - A File activity is added to the activity stream
    info("-- A File activity is added to the activity stream --");
    activity.checkInforAfterAddingDocument(file, "", "File", "423 KB", "", "", "", "");

    /*Clear data*/
    info("-- Clear data --");
    magMember.goToMySpacePage();
    magMember.deleteSpace(spacename);
  }
  /**
   * == Cancel an upload of file == Test case ID: 77779 Step 1: Open popup "Select File" Step 2:
   * Upload a file from local Step 3: Cancel the upload PENDING: can't verify progress bar of the
   * uploaded file --> REASON: Need to upload a large file to server to verify it.
   */
  @Test(groups = "pending")
  public void test01_CancelAnUploadOfFile() {
    /*Declare variables*/
    // String uploadFileName = "ECMS_DMS_SE_Upload_pdffile.pdf";
    // String driverName = "Personal Drives";
    // String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer], click on [File] button
    // - The pop up "Select File" is displayed

    /* Step 2: Upload a file from local */
    // - Select a drive from [Select drive] list
    // - Click on a folder
    // - Click on the icon [Upload]
    // - Select a file from  local
    // - Click [Open]
    // - The progress bar of the uploaded file is displayed
    // - A cross icon in the end of the bar is displayed
    navToolBar.goToHomePage();
    // selectFile(driverName,true,folderPath,"",uploadFileName,"");

    /* Step 3: Cancel the upload */
    // - Click on the cross [x] icon
    // The upload is canceled
  }
  /**
   * == Create a new folder from [Select File] pop up == Test case ID: 77783,77795,77798 Step 1:
   * Open [Select File] popup Step 2: Add a folder
   */
  @Test
  public void test02_OpenSelectFilePopup() {
    /*Declare variables*/
    String folder = "folder77783";
    String driverName = "Personal Drives";
    String folderPath = "Personal Documents";

    /* Step 1: Open popup "Select File" */
    // - Connect to Intranet
    // - From [Activity Composer] box, click on [File]
    // - The pop up [Select File] is displayed
    /* Step 2: Add a folder */
    // - Click on the icon [New Folder]
    // - Enter text into the field
    // - Click on the button [OK]
    // - A pop up to enter a new folder's name is displayed: Please enter new folder's name
    // - The folder is created
    selectFile(driverName, false, folderPath, "", "", folder, false);
    button.closeWindow();

    // Clear data
    navToolBar.goToSiteExplorer();
    actBar.chooseDrive(ecms.ELEMENT_PERSONAL_DRIVE);
    actBar.actionsOnElement(folder, actionType.DELETE, true, true);
  }
  /** CaseId: 68891 -> Add application into container in layout of portal */
  @Test
  public void test03_AddAppToContainer_LayoutOfPortal() {
    String portalName = "Sniffportalnavigation03";

    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));

    goToPortalEditLayout(portalName);
    click(ELEMENT_CATEGORY_COLLABORATION);
    dragAndDropToObject(ELEMENT_ANWSER_PORTLET, By.xpath("//*[text() = 'Portal Page']/.."));
    waitForAndGetElement(
        "//*[@class='portletLayoutDecorator' and contains(text(),'Answers Portlet')]");
    click(ELEMENT_SWITCH_VIEW_MODE_PORTAL);
    waitForAndGetElement(ELEMENT_ANWSER_PORTLET_IN_VIEW_PAGE);
    click(ELEMENT_SWITCH_VIEW_MODE_PORTAL);
    pageE.finishEditLayout();

    deletePortal(portalName);
  }
コード例 #29
0
  /**
   * 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());
  }
コード例 #30
0
  /** Qmetry ID: 102080 Rename form should dismiss when clicking outside Drive: Sites Management */
  @Test
  public void test10_RenameFormShouldDismissWhenClickingOutside() {
    String filePath = "TestData/test.txt";
    By eFile = By.xpath(siteExp.ELEMENT_DOCUMENT_TITLE.replace("${title}", "test.txt"));

    info("-- Test case:  Rename form should dismiss when clicking outside --");

    // Go to sites management
    navToolBar.goToSiteExplorer();

    // 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 form
    rightClickOnElement(eFile);
    click(cMenu.ELEMENT_MENU_RENAME_NODE);
    waitForAndGetElement(cMenu.ELEMENT_INPUT_RENAME_NODE);

    // user clicks out of the field
    click(siteExp.ELEMENT_SIDEBAR_SITES_MANAGEMENT);
    waitForElementNotPresent(cMenu.ELEMENT_INPUT_RENAME_NODE);

    // Restore data
    cMenu.deleteDocument(eFile);
  }