Skip to content

Commit

Permalink
MDL-82898 @enrol_self: Behat to test student enrolment using key
Browse files Browse the repository at this point in the history
  • Loading branch information
andelacruz committed Aug 27, 2024
1 parent 056f473 commit f66f6e8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions enrol/self/tests/behat/self_enrolment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
Expand Down Expand Up @@ -82,6 +83,16 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Then I should see "New section"
And I should not see "Enrolment options"
And I should not see "Enrol me in this course"
And I am on the "Course 1" course page logged in as student2
And I set the following fields to these values:
| Enrolment key | moodle_rules |
And I press "Enrol me"
And I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And the following should exist in the "participants" table:
| First name | Email address | Roles | Groups |
| Student 1 | student1@example.com | Student | Group 1 |
| Student 2 | student2@example.com | Student | No groups |

@javascript
Scenario: Edit a self-enrolled user's enrolment from the course participants page
Expand Down

0 comments on commit f66f6e8

Please sign in to comment.