Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65213

Random behat failures testing messaging contacts

    XMLWordPrintable

    Details

      Description

      This seems to be randomly happening since MDL-64664 has landed.

      For some reason we are getting failures, non-consistent, like this:

      001 Scenario: Decline a 'contact request' from someone # /var/www/html/message/tests/behat/message_drawer_manage_contacts.feature:49
            And I open contact menu                          # /var/www/html/message/tests/behat/message_drawer_manage_contacts.feature:65
              The "((//html/descendant-or-self::*[@data-region = 'message-drawer']/descendant-or-self::*/*[@data-region = 'header-container'])[1]/descendant-or-self::button)[1]" xpath node is not visible and it should be visible
      

      Link: https://ci.moodle.org/job/W36.03.03%20-%20Behat%20-%20Chrome%20+%20MariaDB/lastFailedBuild/

      For some reason, it seems that the previous step in the scenario: "And I click on "Decline" "link_or_button"" is not finishing its job quick enough... so the modal is not closed and then the failing step doesn't find the contact menu to be oppened. The screenshots in the link above seem to indicate that.

      Our early bet is if there is some missing js_pending() and js_complete() code around the calls that those buttons (accept/decline) perform... without them... behat doesn't know that it has to wait and the next step is executed too quickly. But that's just a bet from an ignorant (me), be warned!

      Curiously I was unable to reproduce them locally after 10 executions... may be it happens only in slow/busy machines, aka, the server tooks too much time to complete the "decline" and behat continues too early.

      In any case we need to make these tests stable enough.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sarjona Sara Arjona (@sarjona)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Amaia Anabitarte
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                CiBoT
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m