/** Turns the loader off and performs special parent methods. */
 @Override
 public void stopAnimation() {
   this.isLoading = false;
   if (this.parentImageButton != null) {
     this.parentImageButton.turnOFF();
   } else if (this.parentLegendEntry != null) {
     Toaster.getToasterInstance().addMessage("turnOFF");
   }
 }
 /** Turns the loader on and performs special parent methods. */
 @Override
 public void startAnimation() {
   this.isLoading = true;
   setSrc(this.url);
   if (this.parentImageButton != null) {
     this.parentImageButton.turnON();
   } else if (this.parentLegendEntry != null) {
     //            this.parentLegendEntry.setHeaderLoading();
     Toaster.getToasterInstance().addMessage("turnON");
   }
 }
예제 #3
0
  // verify contact tagged with tag and toasted message
  private void Verify(ContactItem contactItem, String tagName) throws HarnessException {
    // Make sure the tag was created on the server (get the tag ID)
    app.zGetActiveAccount().soapSend("<GetTagRequest xmlns='urn:zimbraMail'/>");
    ;
    String tagID =
        app.zGetActiveAccount()
            .soapSelectValue("//mail:GetTagResponse//mail:tag[@name='" + tagName + "']", "id");

    // Make sure the tag was applied to the contact
    app.zGetActiveAccount()
        .soapSend(
            "<GetContactsRequest xmlns='urn:zimbraMail'>"
                + "<cn id='"
                + contactItem.getId()
                + "'/>"
                + "</GetContactsRequest>");

    String contactTags =
        app.zGetActiveAccount().soapSelectValue("//mail:GetContactsResponse//mail:cn", "t");

    // if multi-tagged
    if (contactTags.contains(",")) {
      ZAssert.assertStringContains(
          contactTags, tagID, "Verify the tag appears on the contact id=" + contactItem.getId());
    } else {
      ZAssert.assertEquals(
          contactTags, tagID, "Verify the tag appears on the contact id=" + contactItem.getId());
    }
    // verify toasted message '1 contact tagged ...'
    Toaster toast = app.zPageMain.zGetToaster();
    String toastMsg = toast.zGetToastMessage();
    ZAssert.assertStringContains(
        toastMsg,
        "1 contact tagged \"" + tagName + "\"",
        "Verify toast message '" + "1 contact tagged \"" + tagName + "\"'");
  }
예제 #4
0
 /**
  * Show exception in a Toast
  *
  * @param message
  */
 protected void showError(final int message) {
     Toaster.showLong(getActivity(), message);
 }
예제 #5
0
 @Test
 public void testOnReceive() {
   assertFalse(Toaster.isOnReceive());
   startupReceiver.onReceive(null, null);
   assertTrue(Toaster.isOnReceive());
 }