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

Random behat fail on tool policy

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.7, 3.4.4, 3.5.1, 3.6
    • Fix Version/s: 3.3.8, 3.4.5, 3.5.2
    • Component/s: Privacy
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-63094-master

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18