Exemple #1
0
  @Test(
      description = "Create a new tasklist using tasks app New -> New Task Folder",
      groups = {"functional"})
  public void CreateTaskFolder_02() throws HarnessException {
    ZimbraAccount account = app.zGetActiveAccount();

    FolderItem taskFolder = FolderItem.importFromSOAP(account, SystemFolder.Tasks);

    _folderName = "taskfolder" + ZimbraSeleniumProperties.getUniqueString();

    // Create folder
    DialogCreateTaskFolder createTaskFolderDialog =
        (DialogCreateTaskFolder)
            app.zPageTasks.zToolbarPressPulldown(Button.B_NEW, Button.O_NEW_TASKFOLDER);

    createTaskFolderDialog.zEnterFolderName(_folderName);
    createTaskFolderDialog.zClickButton(Button.B_OK);

    _folderIsCreated = true;

    SleepUtil.sleepVerySmall();

    // refresh task page
    app.zTreeTasks.zTreeItem(Action.A_LEFTCLICK, taskFolder);

    // Make sure the task folder was created on the ZCS server
    FolderItem folder = FolderItem.importFromSOAP(app.zGetActiveAccount(), _folderName);
    ZAssert.assertNotNull(folder, "Verify task folder is created");
    ZAssert.assertEquals(
        folder.getName(), _folderName, "Verify the server and client folder names match");
  }
Exemple #2
0
  @Test(
      description = "Create a new tasklist by clicking 'Create a new task' on task folders tree",
      groups = {"sanity"})
  public void CreateTaskFolder_01() throws HarnessException {
    ZimbraAccount account = app.zGetActiveAccount();

    FolderItem taskFolder = FolderItem.importFromSOAP(account, SystemFolder.Tasks);

    _folderName = "taskfolder" + ZimbraSeleniumProperties.getUniqueString();

    // Create folder
    // DialogCreateTaskFolder createTaskFolderDialog
    // =(DialogCreateTaskFolder)app.zTreeTasks.zPressButton(Button.B_TREE_NEWTASKLIST);
    DialogCreateTaskFolder createTaskFolderDialog =
        (DialogCreateTaskFolder)
            app.zTreeTasks.zPressPulldown(Button.B_TREE_FOLDERS_OPTIONS, Button.B_TREE_NEWTASKLIST);

    createTaskFolderDialog.zEnterFolderName(_folderName);
    createTaskFolderDialog.zClickButton(Button.B_OK);

    _folderIsCreated = true;

    SleepUtil.sleepVerySmall();

    // refresh task page
    app.zTreeTasks.zTreeItem(Action.A_LEFTCLICK, taskFolder);

    // Make sure the task folder was created on the ZCS server
    FolderItem folder = FolderItem.importFromSOAP(app.zGetActiveAccount(), _folderName);
    ZAssert.assertNotNull(folder, "Verify task folder is created");
    ZAssert.assertEquals(
        folder.getName(), _folderName, "Verify the server and client folder names match");
  }
  // All these tests require the Folder tree to be fully loaded
  @BeforeMethod(groups = {"always"})
  public void folderTreeBeforeMethod() throws HarnessException {
    logger.info("folderTreeBeforeMethod: start");

    for (int i = 0; i < 10; i++) {

      if (app.zTreeMail.zIsActive()) {
        return; // Done!
      }

      SleepUtil.sleep(1000);
    }
    logger.info("folderTreeBeforeMethod: finish");
  }