Exemplo n.º 1
0
 /**
  * This method create a trigger
  *
  * @param triggersPage Trigger PO
  * @param triggerName Trigger name
  */
 public static void createTrigger(TriggersPage triggersPage, String triggerName) {
   triggersPage.clickOnAddTrigger();
   Assert.assertTrue(
       triggersPage.isTriggerPopUPDisplayed(POPUP_ADD_TRIGGER),
       "Adding trigger popup is not displayed");
   triggersPage.addTrigger(triggerName);
   triggersPage.submit();
   Utilities.waitTime(ConstantsClass.TIMEOUT_2_SECONDS);
   Assert.assertTrue(
       triggersPage.existTrigger(triggerName),
       String.format("Trigger '%s' was not added correctly", triggerName));
 }
Exemplo n.º 2
0
 /** This method select trigger at the left panel */
 public static NotificationsPage selectNotificationLeftPanelAndCheckPage(
     TriggersPage triggersPage) {
   NotificationsPage notificationsPage = triggersPage.clickOnNotificationLink();
   Assert.assertTrue(notificationsPage.checkPage(), "Notifications page is not loaded correctly");
   Utilities.waitTime(ConstantsClass.TIMEOUT_1_SECONDS);
   return notificationsPage;
 }
Exemplo n.º 3
0
  /**
   * This method removes a trigger if exists in the list
   *
   * @param triggersPage Trigger PO
   * @param triggerName Trigger name
   */
  public static void deleteTriggerIfExist(TriggersPage triggersPage, String triggerName) {

    if (triggersPage.existTrigger(triggerName)) {

      triggersPage.selectTriggerIntoTheTable(triggerName);
      triggersPage.clickOnRemove();
      Assert.assertTrue(
          triggersPage.isTriggerPopUPDisplayed(POPUP_DELETE_TRIGGER),
          "The remove trigger dialog was not displayed");

      triggersPage.clickOnOK();
      Assert.assertTrue(
          EventsCommon.checkFlareMessageAppearsAndClickToDisappear(FLARE_MESSAGE_TRIGGER_REMOVED));
      WebDriverCommands.refreshPage();

      Assert.assertFalse(
          triggersPage.existTrigger(triggerName),
          String.format("The trigger %s is still in the list", triggerName));
    }
  }
Exemplo n.º 4
0
 /**
  * This method select trigger at the left panel
  *
  * @param triggersPage Trigger PO
  */
 public static void selectTriggerLeftPanelAndCheckPage(TriggersPage triggersPage) {
   triggersPage.clickOnTriggerLink();
   Assert.assertTrue(triggersPage.checkPage(), "Trigger page is not loaded correctly");
   Utilities.waitTime(ConstantsClass.TIMEOUT_1_SECONDS);
 }