Merge branch 'MDL-61022-master' of git://github.com/damyon/moodle
authorDavid Monllao <davidm@moodle.com>
Mon, 18 Dec 2017 09:21:26 +0000 (10:21 +0100)
committerDavid Monllao <davidm@moodle.com>
Mon, 18 Dec 2017 09:21:26 +0000 (10:21 +0100)
admin/tool/recyclebin/tests/behat/basic_functionality.feature

index 26a0096..679a0cf 100644 (file)
@@ -9,6 +9,7 @@ Feature: Basic recycle bin functionality
       | username | firstname | lastname | email |
       | teacher1 | Teacher | 1 | teacher@asd.com |
       | student1 | Student | 1 | student@asd.com |
+      | student2 | Student | 2 | student2@asd.com |
     And the following "courses" exist:
       | fullname | shortname |
       | Course 1 | C1 |
@@ -16,6 +17,23 @@ Feature: Basic recycle bin functionality
     And the following "course enrolments" exist:
       | user | course | role |
       | teacher1 | C1 | editingteacher |
+      | student1 | C1 | student |
+      | student2 | C1 | student |
+      | teacher1 | C2 | editingteacher |
+      | student1 | C2 | student |
+      | student2 | C2 | student |
+    And the following "groups" exist:
+      | name | course | idnumber |
+      | Group A | C2 | G1 |
+      | Group B | C2 | G2 |
+      | Group C | C2 | G3 |
+    And the following "group members" exist:
+      | user | group |
+      | teacher1 | G1 |
+      | teacher1 | G2 |
+      | student1 | G1 |
+      | student2 | G1 |
+      | student2 | G2 |
     And the following config values are set as admin:
       | coursebinenable | 1 | tool_recyclebin |
       | categorybinenable | 1 | tool_recyclebin |
@@ -58,6 +76,12 @@ Feature: Basic recycle bin functionality
     And I wait to be redirected
     And I go to the courses management page
     And I should see "Course 2" in the "#course-listing" "css_element"
+    And I am on "Course 2" course homepage
+    And I navigate to "Groups" node in "Course administration > Users"
+    And I follow "Overview"
+    And "Student 1" "text" should exist in the "Group A" "table_row"
+    And "Student 2" "text" should exist in the "Group A" "table_row"
+    And "Student 2" "text" should exist in the "Group B" "table_row"
 
   @javascript
   Scenario: Deleting a single item from the recycle bin