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

Random fail with some modals

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Behat testing (for you to run)
      1. Apply the patch attached to this issue
      2. Run behat for the @mdl59784 tag (sorry, it's deliberately slow)
        1. Confirm no failure

      I'd recommend applying the test patch and running behat on the pre-upgrade site too to demonstrate the fix.
      Unfortunately it's a semi-random fix so isn't reliable to replicate (yay).

      Manual testing
      1. With the above patch applied, open a course home page and turn editing on
      2. Click on the "Add a block" link immediately:
        1. Confirm that the page does not redirect
        2. Confirm that the dialogue has both a title, and body content
        3. Note: There is likely to be a gap between you clicking on the button, and the modal opening. The modal will open, but we felt it better to do this than ignore the click entirely. There may be scope in a future issue to add a loading spinner but in most cases there is only a negligible wait and not the deliberately extended wait because of the testing patch applied here.
      Show
      Behat testing (for you to run) Apply the patch attached to this issue Run behat for the @mdl59784 tag (sorry, it's deliberately slow) Confirm no failure I'd recommend applying the test patch and running behat on the pre-upgrade site too to demonstrate the fix. Unfortunately it's a semi-random fix so isn't reliable to replicate (yay). Manual testing With the above patch applied, open a course home page and turn editing on Click on the " Add a block " link immediately: Confirm that the page does not redirect Confirm that the dialogue has both a title, and body content Note: There is likely to be a gap between you clicking on the button, and the modal opening. The modal will open, but we felt it better to do this than ignore the click entirely. There may be scope in a future issue to add a loading spinner but in most cases there is only a negligible wait and not the deliberately extended wait because of the testing patch applied here.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-59784-master

      Description

      Looks like we may need some pendingJS work to be added to the modals as we are regularly getting random behat fails with the. Example follows:

      003 Scenario: Blocks can safely be customised # /var/www/html/moodle/blocks/tests/behat/configure_block_throughout_site.feature:63
            And I add the "HTML" block              # /var/www/html/moodle/blocks/tests/behat/configure_block_throughout_site.feature:67
              Css matching locator ".modal-body" not found.
      

      This seems to happen most often when adding a block. In such cases we fall back to the non-JS version:

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Sep/17