Esempio n. 1
0
  // 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");
  }
Esempio n. 2
0
  @Bugs(ids = "69132")
  @Test(
      description = "View a basic appointment in the free busy view",
      groups = {"functional"})
  public void GetAppointment_01() throws HarnessException {

    // Create the appointment on the server
    // Create the message data to be sent
    String subject = "appointment" + ZimbraSeleniumProperties.getUniqueString();

    // Absolute dates in UTC zone
    Calendar now = Calendar.getInstance();
    ZDate startUTC =
        new ZDate(
            now.get(Calendar.YEAR),
            now.get(Calendar.MONTH) + 1,
            now.get(Calendar.DAY_OF_MONTH),
            12,
            0,
            0);
    ZDate endUTC =
        new ZDate(
            now.get(Calendar.YEAR),
            now.get(Calendar.MONTH) + 1,
            now.get(Calendar.DAY_OF_MONTH),
            14,
            0,
            0);

    // EST timezone string
    String tz = ZTimeZone.TimeZoneEST.getID();

    // Create an appointment
    app.zGetActiveAccount()
        .soapSend(
            "<CreateAppointmentRequest xmlns='urn:zimbraMail'>"
                + "<m>"
                + "<inv>"
                + "<comp status='CONF' fb='B' class='PUB' transp='O' allDay='0' name='"
                + subject
                + "' >"
                + "<s d='"
                + startUTC.toTimeZone(tz).toYYYYMMDDTHHMMSS()
                + "' tz='"
                + tz
                + "'/>"
                + "<e d='"
                + endUTC.toTimeZone(tz).toYYYYMMDDTHHMMSS()
                + "' tz='"
                + tz
                + "'/>"
                + "<or a='"
                + app.zGetActiveAccount().EmailAddress
                + "'/>"
                + "</comp>"
                + "</inv>"
                + "<su>"
                + subject
                + "</su>"
                + "<mp ct='text/plain'>"
                + "<content>content</content>"
                + "</mp>"
                + "</m>"
                + "</CreateAppointmentRequest>");

    // -- GUI Actions

    // Go to F/B view
    SleepUtil.sleepMedium();
    app.zPageCalendar.zToolbarPressPulldown(Button.B_LISTVIEW, Button.O_LISTVIEW_FREEBUSY);

    // -- Verification

    // Verify the appointment appears on the page
    SleepUtil.sleepMedium(); // test fails without sleep because calendar view rendering takes time
    ZAssert.assertTrue(
        app.zPageCalendar.zGetApptLocatorFreeBusyView(
            app.zGetActiveAccount().EmailAddress, subject),
        "Verify attendee free/busy row exists");
  }