MOBILE-4081 behat: Check site compatibility

Whether the version of the moodle site is compatible should be checked automatically, however with the current implementation it's only checked once the app is launched. So in some scenarios, it may be necessary to explicitly tell behat to check the site.
main
Noel De Martin 2022-09-05 10:38:02 +02:00
parent 0498f13a3d
commit 8a0e0b0cc8
2 changed files with 12 additions and 1 deletions

View File

@ -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.
*

View File

@ -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 |