Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-45

Non modal notifications should not interfere with UI tests

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • 1.0
    • None
    • None

      Here is another example / a few lines of codes, where tests always fail:

       contentApp.clickRow(titleInitialVersion)
            .hitAction("Publish") 
            .hitAction("Edit page")   
            .hitAction("Edit page properties");
      

      The "problem" is publish which will may take some time plus displays a "banner" ("Successfully bla bla ...").
      These banners, as well as other similar types of notification, interfere with the DOM in a way, that our locators typically fail, as long as such a message is present.
      In some cases it is fine - actually required - to confirm the message, which disappear then.
      But the banner from publishing has no button to confirm (however, there is a [x] to close it), and the message automatically disappear after a few seconds.

      One possible workaround is to discard such notifs, e.g.

      expect.notification()
                      .withMessage("Role successfully deleted.") 
                      .discard();
      

      However, let's see if we can avoid test writers to write such code, unless they actually want to check that such a notif is displayed.

        Acceptance criteria

              fgrilli Federico Grilli
              fgrilli Federico Grilli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD