@Bugs(ids = "82807")
  @Test(
      description = "Hover over an image attachment",
      dataProvider = "DataProviderMimeWithImageAttachments",
      groups = {"functional"})
  public void HoverOverAttachment_01(String subject, String path) throws HarnessException {

    // -- DATA

    final String mimeFile = ZimbraSeleniumProperties.getBaseDirectory() + path;
    LmtpInject.injectFile(app.zGetActiveAccount().EmailAddress, new File(mimeFile));

    // -- GUI

    // Click on Get Mail to refresh the folder list
    app.zPageMail.zToolbarPressButton(Button.B_GETMAIL);

    // Select the message
    DisplayMail display = (DisplayMail) app.zPageMail.zListItem(Action.A_LEFTCLICK, subject);

    List<AttachmentItem> attachments = display.zListGetAttachments();
    ZAssert.assertEquals(attachments.size(), 1, "Verify the attachment appears");

    TooltipImage tooltip =
        (TooltipImage) display.zListAttachmentItem(Action.A_HOVEROVER, attachments.get(0));

    // -- VERIFICATION

    ZAssert.assertTrue(tooltip.zIsActive(), "Verify the tooltip shows");
    ZAssert.assertNotNull(tooltip.zGetField(Field.URL), "Verify the image URL");
  }
예제 #2
0
  @Bugs(ids = "81078")
  @Test(
      description = "Verify the LinkedIn zimlet appears in the folder tree",
      groups = {"functional"})
  public void FolderTree_01() throws HarnessException {

    // -- DATA

    ZimletItem linkedin =
        CoreZimletItem.getCoreZimlet(CoreZimletName.com_zimbra_linkedinimage, app);

    // -- GUI

    // Expand the zimlets section
    app.zTreeMail.zSectionAction(FolderSectionAction.Expand, FolderSection.Zimlets);

    // Get the list of zimlets
    List<ZimletItem> zimlets = app.zTreeMail.zListGetZimlets();

    // -- VERIFICATION

    // Find out if LinkedIn is listed
    ZimletItem found = null;
    for (ZimletItem zimlet : zimlets) {
      if (linkedin.equals(zimlet)) {
        found = zimlet;
      }
    }

    ZAssert.assertNotNull(found, "Verify the LinkedIn Zimlet was found");
  }
예제 #3
0
  @Bugs(ids = "81920")
  @Test(
      description = "Reply to a conversation with a draft",
      groups = {"functional"})
  public void Bug81920_01() throws HarnessException {

    // -- DATA

    // Create a conversation
    ConversationItem c = ConversationItem.createConversationItem(app.zGetActiveAccount());

    // Create a draft in the conversation
    // First, need to determine the last message received
    int id = 0;
    for (MailItem m : c.getMessageList()) {
      if (Integer.parseInt(m.getId()) > id) {
        id = Integer.parseInt(m.getId());
      }
    }
    String body = "draft" + ZimbraSeleniumProperties.getUniqueString();
    app.zGetActiveAccount()
        .soapSend(
            "<SaveDraftRequest xmlns='urn:zimbraMail'>"
                + "<m origid='"
                + id
                + "' rt='r'>"
                + "<e t='t' a='"
                + ZimbraAccount.AccountA().EmailAddress
                + "'/>"
                + "<su>RE: "
                + c.getSubject()
                + "</su>"
                + "<mp ct='text/plain'>"
                + "<content>"
                + body
                + "</content>"
                + "</mp>"
                + "</m>"
                + "</SaveDraftRequest>");

    // Change the whole conversation to be unread
    app.zGetActiveAccount()
        .soapSend(
            "<ItemActionRequest xmlns='urn:zimbraMail'>"
                + "<action op='!read' id='"
                + c.getId()
                + "'/>"
                + "</ItemActionRequest>");

    // -- GUI

    // Click Get Mail button
    app.zPageMail.zToolbarPressButton(Button.B_GETMAIL);

    // Select the item
    app.zPageMail.zListItem(Action.A_LEFTCLICK, c.getSubject());

    // Click reply
    FormMailNew mailform = (FormMailNew) app.zPageMail.zToolbarPressButton(Button.B_REPLY);
    ZAssert.assertNotNull(mailform, "Verify the new form opened");

    // Send the message
    mailform.zSubmit();

    // -- Verification

    // From the test account, check the sent folder for the reply
    MailItem sent =
        MailItem.importFromSOAP(
            app.zGetActiveAccount(), "in:sent subject:(" + c.getSubject() + ")");
    ZAssert.assertNotNull(sent, "Verify the sent message in the sent folder");

    // Verify the draft body does not appear in the reply
    ZAssert.assertStringDoesNotContain(
        sent.dBodyText, body, "Verify the draft body does not appear in the reply");
  }
예제 #4
0
  @Bugs(ids = "81920")
  @Test(
      description = "Reply to a conversation with a spammed message",
      groups = {"functional"})
  public void Bug81920_03() throws HarnessException {

    // -- DATA

    // Create a conversation
    ConversationItem c = ConversationItem.createConversationItem(app.zGetActiveAccount());

    // Create a draft in the conversation
    // First, need to determine the last message received
    int id = 0;
    String body = null;
    for (MailItem m : c.getMessageList()) {
      if (Integer.parseInt(m.getId()) > id) {
        id = Integer.parseInt(m.getId());
        body = m.dBodyText;
      }
    }

    // Move the last message to the trash
    app.zGetActiveAccount()
        .soapSend(
            "<ItemActionRequest xmlns='urn:zimbraMail'>"
                + "<action op='spam' id='"
                + id
                + "'/>"
                + "</ItemActionRequest>");

    // Change the whole conversation to be unread
    app.zGetActiveAccount()
        .soapSend(
            "<ItemActionRequest xmlns='urn:zimbraMail'>"
                + "<action op='!read' id='"
                + c.getId()
                + "'/>"
                + "</ItemActionRequest>");

    // -- GUI

    // Click Get Mail button
    app.zPageMail.zToolbarPressButton(Button.B_GETMAIL);

    // Select the item
    app.zPageMail.zListItem(Action.A_LEFTCLICK, c.getSubject());

    // Click reply
    FormMailNew mailform = (FormMailNew) app.zPageMail.zToolbarPressButton(Button.B_REPLY);
    ZAssert.assertNotNull(mailform, "Verify the new form opened");

    // Send the message
    mailform.zSubmit();

    // -- Verification

    // From the test account, check the sent folder for the reply
    MailItem sent =
        MailItem.importFromSOAP(
            app.zGetActiveAccount(), "in:sent subject:(" + c.getSubject() + ")");
    ZAssert.assertNotNull(sent, "Verify the sent message in the sent folder");

    // Verify the draft body does not appear in the reply
    ZAssert.assertStringDoesNotContain(
        sent.dBodyText, body, "Verify the spam body does not appear in the reply");
  }