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

Random behat fail on tool policy

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.7, 3.4.4, 3.5.1, 3.6
    • 3.3.8, 3.4.5, 3.5.2
    • Privacy
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-63094-master
    • Hide

      To be verified in all branches:

      1. Purge caches
      2. Login as admin
      3. Navigate to Site administration > Users > Privacy and Policies > Policy settings
        1. Set the "Site policy handler" to "Policies (tool_policy)"
      4. Navigate to Site administration > Users > Privacy and Policies > Policies and agreements
        1. Create a new policy
          1. Set its status to Active
      5. Log out
        1. Confirm that the banner at the bottom is floating
        2. Confirm that the banner at the bottom is partially translucent/see-through
        3. Confirm that the banner at the bottom lists the policy you just created
      Show
      To be verified in all branches: Purge caches Login as admin Navigate to Site administration > Users > Privacy and Policies > Policy settings Set the "Site policy handler" to "Policies (tool_policy)" Navigate to Site administration > Users > Privacy and Policies > Policies and agreements Create a new policy Set its status to Active Log out Confirm that the banner at the bottom is floating Confirm that the banner at the bottom is partially translucent/see-through Confirm that the banner at the bottom lists the policy you just created

    Description

      I suspect that there are some race conditions with the modals used to display policies from the footer which are causing this:
      https://ci.moodle.org/job/S33.05.01%20-%20Behat%20-%20Chrome%20+%20Postgres%20+%20Clean/lastFailedBuild/

      The order of the JS is (triggered by clicking on the policy):

      1. init vars
      2. make request
      3. on request success:
        1. create modal
        2. setup handler
        3. display modal

      We should re-order this and add in pending checks so that it is:

      1. init vars
      2. start pending JS call
      3. create modal using promises for resolution of body and title
      4. configure setup of modal
      5. make request
      6. on request success resolve promises for body/title
      7. on display of modal, complete the JS call check

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Jun Pataleta Jun Pataleta
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Mitxel Moriana Mitxel Moriana
              Andrew Lyons, Adrian Greeve, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Sep/18