diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature index a08f3bd541a..6ba06c8f362 100644 --- a/enrol/self/tests/behat/self_enrolment.feature +++ b/enrol/self/tests/behat/self_enrolment.feature @@ -16,6 +16,19 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe | user | course | role | | teacher1 | C1 | editingteacher | + @javascript + Scenario: Self-enrolment enabled as guest + Given I log in as "teacher1" + And I follow "Course 1" + And I add "Self enrolment" enrolment method with: + | Custom instance name | Test student enrolment | + And I log out + When I follow "Course 1" + And I press "Log in as a guest" + Then I should see "Guests can not access this course, please try to log in." + And I press "Continue" + And I should see "Log in" + @javascript Scenario: Self-enrolment enabled Given I log in as "teacher1"