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

Small typo in behat step should_appear_before()

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      For every branch

      1. Copy the attached before_reports_before.feature to lib/tests/behat
      2. Init behat (php admin/tool/behat/cli/init.php)
        1. Take note of the command given at the end...
      3. Run behat using the command from the previous step with --suite default --name 'Before reports before'
      4. Verify that:
        1. There is 1 scenario executed and it fails.
        2. The scenario is named "Fail because Calendar in not before Dashboard"
        3. The last line of the failure is like this (special attention to the "before" word being present):

          'Calendar' 'link' does not appear before 'Dashboard' 'link' (Behat\Mink\Exception\ExpectationException)

      That's all!

      Show
      For every branch Copy the attached before_reports_before.feature to lib/tests/behat Init behat ( php admin/tool/behat/cli/init.php ) Take note of the command given at the end... Run behat using the command from the previous step with --suite default --name 'Before reports before' Verify that: There is 1 scenario executed and it fails. The scenario is named "Fail because Calendar in not before Dashboard" The last line of the failure is like this (special attention to the "before" word being present): 'Calendar' 'link' does not appear before 'Dashboard' 'link' (Behat\Mink\Exception\ExpectationException) That's all!
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.5 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:

      Description

      Detected when looking for MDL-66553 failures.

      There is an obvious (copy/paste) error in the error message of the should_appear_before() step.

      Whenever it fails, currently this is shown (real example):

      Then "C question 3 name" "checkbox" should appear before "A question 1 name" "checkbox"
      Problem: 'C question 3 name' 'checkbox' does not appear AFTER 'A question 1 name' 'checkbox'
      

      That is clearly, an oxymoron, heh. The "Problem" should be, instead:

      Problem: 'C question 3 name' 'checkbox' does not appear BEFORE 'A question 1 name' 'checkbox'
      

      aka, s/after/before

      that is exactly what is being checked by the step.

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Luca Bösch
            Integrator:
            Andrew Nicols
            Tester:
            Gladys Basiana
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Nov/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h