From d60ae7323633ca244f689916faa05dbdf03ee7e3 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 30 Dec 2015 15:16:44 +0000 Subject: [PATCH 1/1] MDL-38020 behat: for enrollment management from participants page --- ...anage_enrolments_from_participants.feature | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 enrol/tests/behat/manage_enrolments_from_participants.feature diff --git a/enrol/tests/behat/manage_enrolments_from_participants.feature b/enrol/tests/behat/manage_enrolments_from_participants.feature new file mode 100644 index 00000000000..4ad12c3b18f --- /dev/null +++ b/enrol/tests/behat/manage_enrolments_from_participants.feature @@ -0,0 +1,37 @@ +@core_enrol +Feature: Manage enrollments from participants page + In order to manage course participants + As a teacher + In need to get to the enrolment page from the course participants page + + Background: + Given the following "users" exist: + | username | firstname | lastname | email | + | student1 | Student | 1 | student1@example.com | + | student2 | Student | 2 | student2@example.com | + | teacher1 | teacher | 1 | teacher1@example.com | + And the following "courses" exist: + | fullname | shortname | format | + | Course 1 | C1 | topics | + And the following "course enrolments" exist: + | user | course | role | + | student1 | C1 | student | + | student2 | C1 | student | + | teacher1 | C1 | editingteacher | + And I log in as "teacher1" + And I follow "Course 1" + And I navigate to "Participants" node in "Current course > C1" + + @javascript + Scenario: Check the participants link when "All partipants" selected + Given I set the field "roleid" to "All participants" + When I follow "Edit" + Then I should see "Enrolled users" in the "h2" "css_element" + And the field "Role" matches value "All" + + @javascript + Scenario: Check the participants link when "Student" selected + Given I set the field "roleid" to "Student" + When I follow "Edit" + Then I should see "Enrolled users" in the "h2" "css_element" + And the field "Role" matches value "Student" -- 2.43.0