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

Boost Behat steps get confused when blocks have similar names

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Modify pluginname in blocks/badges/lang/en/block_badges.php to "Courses Latest badges"
      2. Run following features and make sure they pass
        • my/tests/behat/restrict_available_blocks.feature
      Show
      Modify pluginname in blocks/badges/lang/en/block_badges.php to "Courses Latest badges" Run following features and make sure they pass my/tests/behat/restrict_available_blocks.feature
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      wip-mdl-57765

      Description

      This scenario:

      Scenario: Remove the ability to add the comments block to Dashboard
      

      And this step:

      And the add block selector should not contain "Courses" block
      

      Breaks when you have another block installed that has "Courses" as part of its name.

      I believe the solution is to update \behat_theme_boost_behat_blocks::the_add_block_selector_should_not_contain_block to use a "named_exact" selector, but all the selectors I found use "named_partial".

      It looks like (all the?) other methods in \behat_theme_boost_behat_blocks should get the same fix as well.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Mar/17