diff --git a/local_moodleappbehat/tests/behat/behat_app.php b/local_moodleappbehat/tests/behat/behat_app.php index 4b644d1f3..84f4f2220 100644 --- a/local_moodleappbehat/tests/behat/behat_app.php +++ b/local_moodleappbehat/tests/behat/behat_app.php @@ -558,6 +558,16 @@ class behat_app extends behat_app_helper { } } + /** + * Check whether the moodle site is compatible with the current feature file + * and skip it otherwise. This will be checked looking at tags such as @lms_uptoXXX + * + * @Given the Moodle site is compatible with this feature + */ + public function the_moodle_site_is_compatible_with_this_feature() { + $this->check_tags(); + } + /** * Clicks on / touches something that is visible in the app. * diff --git a/src/core/features/course/tests/behat/basic_usage-311.feature b/src/core/features/course/tests/behat/basic_usage-311.feature index 99d3f88c7..99b642baf 100755 --- a/src/core/features/course/tests/behat/basic_usage-311.feature +++ b/src/core/features/course/tests/behat/basic_usage-311.feature @@ -72,7 +72,8 @@ Feature: Test basic usage of one course in app | workshop | Test workshop name | Test workshop | C1 | workshop | 0 | 3 | Scenario: Self enrol - Given I log in as "teacher1" + Given the Moodle site is compatible with this feature + And I log in as "teacher1" And I am on "Course 1" course homepage And I add "Self enrolment" enrolment method with: | Custom instance name | Student self enrolment |