コード例 #1
0
  @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
  /**
   * TestCase : Trusted Domain with message view 1.Set domain in Preference/Mail/Trusted Addresses
   * Verify it through soap(GetPrefsRequest) 2.In message View Inject mail with external image
   * 3.Verify To,From,Subject through soap 4.Click on same mail 5.Yellow color Warning Msg Info bar
   * should not present for trusted domain
   *
   * @throws HarnessException
   */
  @Test(
      description = "Verify Display Image link in Trusted doamin for message view",
      groups = {"smoke"})
  public void TrustedDomainMsgView_01() throws HarnessException {

    final String subject = "TestTrustedAddress";
    final String from = "*****@*****.**";
    final String to = "*****@*****.**";
    final String mimeFolder =
        ZimbraSeleniumProperties.getBaseDirectory() + "/data/public/mime/ExternalImg.txt";

    // Verify domain through soap- GetPrefsRequest
    String PrefMailTrustedAddr =
        ZimbraAccount.AccountZWC().getPreference("zimbraPrefMailTrustedSenderList");
    ZAssert.assertTrue(
        PrefMailTrustedAddr.equals("testdoamin.com"), "Verify doamin is present /Pref/TrustedAddr");

    // Inject the external image message(s)
    LmtpInject.injectFile(app.zGetActiveAccount().EmailAddress, new File(mimeFolder));

    MailItem mail = MailItem.importFromSOAP(app.zGetActiveAccount(), subject);

    ZAssert.assertNotNull(mail, "Verify message is received");
    ZAssert.assertEquals(from, mail.dFromRecipient.dEmailAddress, "Verify the from matches");
    ZAssert.assertEquals(to, mail.dToRecipients.get(0).dEmailAddress, "Verify the to address");

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

    // Select the message so that it shows in the reading pane
    app.zPageMail.zListItem(Action.A_LEFTCLICK, subject);

    // DisplayTrustedAddress actual = new DisplayTrustedAddress(app);

    // Verify Warning info bar with other links

    ZAssert.assertFalse(
        app.zPageMail.zHasWDDLinks(),
        "Verify Warning icon ,Display Image and Domain link  does not present");
  }
コード例 #3
0
ファイル: Bug13911.java プロジェクト: nullin/zimbra-sources
  @Test(
      description = "Verify bug 13911",
      groups = {"functional"})
  public void Bug_13911() throws HarnessException {

    String subject = "subject13010064065623";
    String bodyBeforeImage = "K\u00e6re alle";
    String bodyAfterImage = "Problemet best\u00E5r";

    String MimeFolder =
        ZimbraSeleniumProperties.getBaseDirectory() + "/data/private/mime/Bugs/Bug13911";
    LmtpInject.injectFile(ZimbraAccount.AccountZWC().EmailAddress, new File(MimeFolder));

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

    // Select the message so that it shows in the reading pane
    DisplayMail display = (DisplayMail) app.zPageMail.zListItem(Action.A_LEFTCLICK, subject);

    String body = display.zGetMailProperty(Field.Body);

    ZAssert.assertStringContains(body, bodyBeforeImage, "Verify the text before the image");
    ZAssert.assertStringContains(body, bodyAfterImage, "Verify the text after the image");
  }