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

Problems with "should not see" steps.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      The whole suite is running in the CI server

      1. cd /your/moodle/dirroot
      2. git fetch git://github.com/dmonllao/moodle.git MDL-42013-testme
      3. git cherry-pick e51cd37555c28cd7c7417c0c27334b70cf03b0fc
      4. install/update/enable behat
      5. Run behat with --tags @MDL-42013
      6. You SHOULD see 5 failures, all from admin/tool/behat/tests/behat/MDL-42013.feature
      Show
      The whole suite is running in the CI server cd /your/moodle/dirroot git fetch git://github.com/dmonllao/moodle.git MDL-42013 -testme git cherry-pick e51cd37555c28cd7c7417c0c27334b70cf03b0fc install/update/enable behat Run behat with --tags @ MDL-42013 You SHOULD see 5 failures, all from admin/tool/behat/tests/behat/ MDL-42013 .feature
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42013_master

      Description

      Commented by Eric Merrill @ dev chat: https://moodle.org/local/chatlogs/index.php?conversationid=13884

      1) Case 1: this scenario does not fail. And it should.

       Given I log in as "admin"
       Then I should not see "Home"
       And I follow "Home"
      

      2) Case 2: step fails but because of php notice, not because the "should not" is working ok. Apply this change and run it:

      --- a/blocks/navigation/tests/behat/view_my_courses.feature
      +++ b/blocks/navigation/tests/behat/view_my_courses.feature
      @@ -40,7 +40,7 @@ Feature: View my courses in navigation block
           When I follow "My home"
           Then I should not see "cat1" in the "Navigation" "block"
           And I should not see "cat2" in the "Navigation" "block"
      -    And I should see "c1" in the "Navigation" "block"
      +    And I should not see "c1" in the "Navigation" "block"
           And I should see "c31" in the "Navigation" "block"
           And I should see "c331" in the "Navigation" "block"
           And I should not see "c2" in the "Navigation" "block"
      

      So something is performing wrongly with those "not see" steps. Ciao

        Attachments

          Activity

            People

            Assignee:
            dmonllao David Monllaó
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Eric Merrill
            Integrator:
            Dan Poltawski
            Tester:
            Ankit Agarwal
            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/13