Exemplo n.º 1
0
  @Bugs(ids = "69132")
  @Test(
      description = "Create simple all day appointment in week view",
      groups = {"smoke"})
  public void CreateAllDayAppointment_01() throws HarnessException {

    // Create appointment
    String apptSubject;
    apptSubject = "appointment" + ZimbraSeleniumProperties.getUniqueString();
    AppointmentItem appt = new AppointmentItem();

    appt.setSubject(apptSubject);
    appt.setContent("content" + ZimbraSeleniumProperties.getUniqueString());
    appt.setAttendees(ZimbraAccount.AccountA().EmailAddress);
    appt.setIsAllDay(true);

    // Open the new mail form
    FormApptNew apptForm = (FormApptNew) app.zPageCalendar.zToolbarPressButton(Button.B_NEW);
    apptForm.zFill(appt);
    apptForm.zSubmit();

    // Verify the new appointment exists on the server
    AppointmentItem actual =
        AppointmentItem.importFromSOAP(
            app.zGetActiveAccount(), "subject:(" + appt.getSubject() + ")");
    ZAssert.assertNotNull(actual, "Verify the new appointment is created");
    ZAssert.assertEquals(
        actual.getSubject(), appt.getSubject(), "Subject: Verify the appointment data");
    ZAssert.assertEquals(
        app.zGetActiveAccount()
            .soapMatch("//mail:GetAppointmentResponse//mail:comp", "allDay", "1"),
        true,
        "");

    // Verify in UI
    app.zPageCalendar.zToolbarPressButton(Button.B_REFRESH);
    ZAssert.assertEquals(
        app.zPageCalendar.sIsElementPresent(app.zPageCalendar.zGetAllDayApptLocator(apptSubject)),
        true,
        "Verify all-day appointment present in UI");
  }