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

Random Behat failure for features involving the form_autocomplete element

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Behat
      1. Copy behat_autocomplete.sh to your moodle root directory and run it.
        • Confirm that all tests pass.
      Autocomplete with static options
      1. Copy test_autocomplete.php to your moodle root directory and open it on your web browser.
      2. Key in some letters/words that matches the options (e.g. "opt") into each autocomplete element.
        • Confirm that suggestions are appropriately shown and that you don't see "No suggestions" first before the correct suggestions are shown.
      Autocomplete with options retrieved via an AJAX handler
      1. Login as an admin.
      2. Enable the Course meta link in the Enrolment plugins settings page.
      3. Create at least 3 courses C1, C2 and C3.
      4. Navigate to the enrolment methods page of C1. (C1's course page > Participants > Enrolment methods)
      5. Add the course meta link enrolment method.
      6. Key in some letters/words that matches at least one of the options (e.g. "c") into the "Link course" autocomplete element.
        • Confirm that suggestions (C2 and C3) are appropriately shown and that you don't see "No suggestions" first before the correct suggestions are shown.
      Show
      Behat Copy behat_autocomplete.sh to your moodle root directory and run it. Confirm that all tests pass. Autocomplete with static options Copy test_autocomplete.php to your moodle root directory and open it on your web browser. Key in some letters/words that matches the options (e.g. "opt") into each autocomplete element. Confirm that suggestions are appropriately shown and that you don't see "No suggestions" first before the correct suggestions are shown. Autocomplete with options retrieved via an AJAX handler Login as an admin. Enable the Course meta link in the Enrolment plugins settings page. Create at least 3 courses C1, C2 and C3. Navigate to the enrolment methods page of C1. (C1's course page > Participants > Enrolment methods) Add the course meta link enrolment method. Key in some letters/words that matches at least one of the options (e.g. "c") into the " Link course " autocomplete element. Confirm that suggestions (C2 and C3) are appropriately shown and that you don't see "No suggestions" first before the correct suggestions are shown.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-59836-master

      Description

      The following Behat failures are being encountered:

      001 Scenario: View a student's enrolment details for a student enrolled via course meta link where editing can't be done # /var/www/html/moodle/user/tests/behat/edit_user_enrolment.feature:70
            Then I should see "Student 3" in the "participants" "table"                                                        # /var/www/html/moodle/user/tests/behat/edit_user_enrolment.feature:90
              "Student 3" text was not found in the "participants" element
              
      002 Scenario: Add meta enrolment instance with groups                  # /var/www/html/moodle/enrol/meta/tests/behat/enrol_meta.feature:47
            Then I should see "Groupcourse 1" in the "Student 1" "table_row" # /var/www/html/moodle/enrol/meta/tests/behat/enrol_meta.feature:57
              Table_row matching locator "'Student 1'" not found.
      

      The failures seem to be rooted on the instance when the value for the "Link course" autocomplete element in the Course meta link enrolment method page.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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