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

              Assignee:
              jbthong Thong Bui
              Reporter:
              HuongNV Huong Nguyen
              Peer reviewer:
              Andrew Lyons Andrew Lyons
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega Janelle Barcega
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                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