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

Behat: should_not_exist function does not work correctly

    XMLWordPrintable

Details

    Description

      The function should_not_exist in lib/tests/behat/behat_general.php is not worked correctly.

      The Behat step related to this function: @Then /^"(?P<element_string>(?:[^"]|
      "))" "(?P<selector_string>[^"])" should not exist will be always passed even the element is exist.

       

      It's just a simple fix, remove the return in the try block will fix the issue.

      https://github.com/moodle/moodle/blob/7fa836cf3680c1d041daae6dd5bad4c246b5f85f/lib/tests/behat/behat_general.php#L1012

      Attachments

        Issue Links

          Activity

            People

              jbthong Thong Bui
              HuongNV Huong Nguyen
              Andrew Lyons Andrew Lyons
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                25/Mar/21

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 56 minutes
                  2h 56m