Skip to content

Commit

Permalink
Fix a behat test which broke recently
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Aug 20, 2024
1 parent fa1ab6d commit 133622c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-08-19 - Fix a behat test which broke recently
* 2024-08-11 - Add section for scheduled tasks to README
* 2024-08-11 - Updated Moodle Plugin CI to latest upstream recommendations

Expand Down
39 changes: 29 additions & 10 deletions tests/behat/local_bulkenrol_groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ Feature: Using the local_bulkenrol plugin for group management
| Group 2 | Group already exists |
| Group 3 | Group already exists |
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | First name | Last name | User enrolment | Group membership | Group membership |
| student1@example.com | Student | 1 | User will be enrolled | Group 1 | User will be added to group |
| student2@example.com | Student | 2 | User will be enrolled | Group 2 | User will be added to group |
| student3@example.com | Student | 3 | User will be enrolled | Group 3 | User will be added to group |
| Email address | First name | Last name | User enrolment | Group membership |
| student1@example.com | Student | 1 | User will be enrolled | Group 1 |
| student2@example.com | Student | 2 | User will be enrolled | Group 2 |
| student3@example.com | Student | 3 | User will be enrolled | Group 3 |
# We have to check the group membership action badge in a separate step,
# otherwise we would trigger the 'Table contains duplicate column headers' coding exception message.
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | Group membership |
| student1@example.com | User will be added to group |
| student2@example.com | User will be added to group |
| student3@example.com | User will be added to group |
And I click on "Enrol users" "button"
Then the following should exist in the "participants" table:
| Email address | First name | Last name | Roles | Groups |
Expand Down Expand Up @@ -94,9 +101,15 @@ Feature: Using the local_bulkenrol plugin for group management
| Group 1 | Group already exists |
| Group 2 | Group already exists |
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | First name | Last name | User enrolment | Group membership | Group membership |
| student1@example.com | Student | 1 | User is already enrolled | Group 1 | User will be added to group |
| student2@example.com | Student | 2 | User is already enrolled | Group 2 | User will be added to group |
| Email address | First name | Last name | User enrolment | Group membership |
| student1@example.com | Student | 1 | User is already enrolled | Group 1 |
| student2@example.com | Student | 2 | User is already enrolled | Group 2 |
# We have to check the group membership action badge in a separate step,
# otherwise we would trigger the 'Table contains duplicate column headers' coding exception message.
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | Group membership |
| student1@example.com | User will be added to group |
| student2@example.com | User will be added to group |
And I click on "Enrol users" "button"
Then the following should exist in the "participants" table:
| Email address | First name | Last name | Roles | Groups |
Expand Down Expand Up @@ -133,9 +146,15 @@ Feature: Using the local_bulkenrol plugin for group management
| Group 1 | Group already exists |
| Group 2 | Group already exists |
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | First name | Last name | User enrolment | Group membership | Group membership |
| student1@example.com | Student | 1 | User is already enrolled | Group 1 | User is already group member |
| student2@example.com | Student | 2 | User is already enrolled | Group 2 | User is already group member |
| Email address | First name | Last name | User enrolment | Group membership |
| student1@example.com | Student | 1 | User is already enrolled | Group 1 |
| student2@example.com | Student | 2 | User is already enrolled | Group 2 |
# We have to check the group membership action badge in a separate step,
# otherwise we would trigger the 'Table contains duplicate column headers' coding exception message.
And the following should exist in the "localbulkenrol_enrolusers" table:
| Email address | Group membership |
| student1@example.com | User is already group member |
| student2@example.com | User is already group member |
And I click on "Enrol users" "button"
Then the following should exist in the "participants" table:
| Email address | First name | Last name | Roles | Groups |
Expand Down

0 comments on commit 133622c

Please sign in to comment.