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

ModalFactory loaded inside out

XMLWordPrintable

    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-59859-master
    • Hide
      1. Navigate to the course participants page
      2. Open the Enrol users dialogue
        1. Confirm that the title, and body are present and look complete
        2. Confirm that the primary button says Enrol selected users and cohorts
      3. Apply the patch attached to this issue
      4. Run behat for the @mdl59859 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).

      See the Issue Description for the description of the fail when it is seen.

      Show
      Navigate to the course participants page Open the Enrol users dialogue Confirm that the title, and body are present and look complete Confirm that the primary button says Enrol selected users and cohorts Apply the patch attached to this issue Run behat for the @mdl59859 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). See the Issue Description for the description of the fail when it is seen.

      We're creating the Modal from the factory within a promise, rather than using the promise within the factory. We need to switch things around so that the factory takes the promise. This means that the trigger which opens the dialogue is registered earlier and leads to a better UX as the button is acted upon earlier.

      This causes behat fails because the trigger has not been added in time leading to the manual page being loaded instead:

      ---Running behat Process 1 again for failed steps---
      Moodle 3.4dev (Build: 20170817), 27466d7548de99cbb050027acc3e809ce49ad2e9
      Php: 7.0.16.4.1, mysqli: 5.7.19, OS: Linux 4.4.0-91-generic x86_64
      Server OS "Linux", Browser: "firefox"
      Started at 18-08-2017, 04:41
      ...F----------------
       
      --- Failed steps:
       
      001 Scenario: Courses are created with the default announcements forum # /var/www/html/moodle/course/tests/behat/course_creation.feature:8
            And I enrol "Teacher 1" user as "Teacher"                        # /var/www/html/moodle/course/tests/behat/course_creation.feature:17
              Field matching locator "'Select users'" not found.
              
              +--[ http://172.18.0.11/moodle/behatrun1/enrol/manual/manage.php?enrolid=193000&id=175000 | MoodleSelenium2Driver ]
              |
              |  <!DOCTYPE html>
              |  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr" class="yui3-js-enabled"><head>
              |      <title>Manual enrolments</title>
              |      <link href="http://172.18.0.11/moodle/behatrun1/theme/image.php/clean/theme/1502986993/favicon" rel="shortcut icon" />
              |      <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
              |  <meta content="moodle, Manual enrolments" name="keywords" />
              |  <link href="http://172.18.0.11/moodle/behatrun1/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.css" type="text/css" rel="stylesheet" /><script charset="utf-8" id="yui_3_17_2_1_1503002529595_8" src="http://172.18.0.11/moodle/behatrun1/theme/yui_combo.php?m/1502986993/core/dock/dock-loader-debug.js" async=""></script><script charset="utf-8" id="yui_3_17_2_1_1503002529595_27" src="http://172.18.0.11/moodle/behatrun1/theme/yui_combo.php?m/1502986993/core/event/event-debug.js&amp;m/1502986993/filter_mathjaxloader/loader/loader-debug.js" async=""></script><link charset="utf...
              |
       
      1 scenario (1 failed)
      20 steps (3 passed, 1 failed, 16 skipped)
      0m27.57s (41.98Mb)
      
      

      http://nightly.test.in.moodle.com:8080/job/M.04%20Behat%20(Firefox)%20Parallel%20-%20Clean/lastFailedBuild/console

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Ryan Wyllie Ryan Wyllie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.