Then "student" should have the role "Student" in the course

Assert that a participant of the scenario's course has, or does not have, a role there, as the "Roles" column of the participants page lists it.

Examples

Then "student" should have the role "Student" in the course
Then "student" should not have the role "Non-editing teacher" in the course
And "teacher" should have the role "Teacher" in the course
Then "student" should have the role "Non-editing teacher" in the course
But "teacher" should not have the role "Student" in the course

Pattern

Then(/^"([^"]*)" should( not)* have the role "([^"]*)" in the course$/, …)

Part of @webship-js/moodle-steps (github.com/webship/moodle-steps), a step pack for Webship-js 2.0.x.