2 Feature: Courses can be searched for and moved in bulk.
3 In order to manage a large number of courses
4 As a Moodle Administrator
5 I need to be able to search courses in bulk and move them around
8 Given the following "categories" exist:
9 | name | category | idnumber |
12 | Miscellaneous | 0 | MISC |
13 And the following "courses" exist:
14 | fullname | shortname | category |
15 | Biology Y1 | BIO1 | MISC |
16 | Biology Y2 | BIO2 | MISC |
17 | English Y1 | ENG1 | ENG |
18 | English Y2 | ENG2 | MISC |
20 Scenario: Search courses finds correct results
21 Given I log in as "admin"
22 And I go to the courses management page
23 When I set the field "Search" to "Biology"
25 Then I should see "Biology Y1"
26 And I should see "Biology Y2"
27 And I should not see "English Y1"
28 And I should not see "English Y2"
31 Scenario: Search courses and move results in bulk
32 Given I log in as "admin"
33 And I go to the courses management page
34 And I set the field "Search" to "Biology"
36 When I select course "Biology Y1" in the management interface
37 And I select course "Biology Y2" in the management interface
38 And I set the field "menumovecoursesto" to "Science"
40 Then I should see "Successfully moved 2 courses into Science"
41 And I wait to be redirected
42 And I click on category "Science" in the management interface
43 And I should see "Biology Y1"
44 And I should see "Biology Y2"