Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
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
6
 
7
  Background:
8
    Given the following "categories" exist:
9
      | name | category | idnumber |
10
      | Science | 0 | SCI |
11
      | English | 0 | ENG |
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 |
19
 
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"
24
    And I press "Search"
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"
29
 
1441 ariadna 30
  Scenario: Search courses displays contact names
31
    Given the following "users" exist:
32
      | username  | firstname | lastname | email          |
33
      | teacher1  | Teacher   | 1        | t1@example.com |
34
      | teacher2  | Teacher   | 2        | t2@example.com |
35
      | teacher3  | Teacher   | 3        | t3@example.com |
36
      | teacher4  | Teacher   | 4        | t3@example.com |
37
    And the following "course enrolments" exist:
38
      | user | course | role |
39
      | teacher1 | BIO1 | editingteacher |
40
      | teacher2 | ENG2 | editingteacher |
41
      | teacher3 | BIO1 | teacher |
42
      | teacher4 | BIO1 | editingteacher |
43
    And I log in as "admin"
44
    And I navigate to "Appearance > Courses" in site administration
45
    And I set the following fields to these values:
46
      | Teacher | 1 |
47
      | Non-editing teacher | 1 |
48
    And I press "Save changes"
49
    When I go to the courses management page
50
    And I set the field "Search" to "BIO1"
51
    And I press "Search"
52
    Then I should see "Biology Y1"
53
    When I follow "Biology Y1"
54
    Then I should see "Course contacts"
55
    And I should see "Teacher: Teacher 1, Teacher 4"
56
    And I should see "Non-editing teacher: Teacher 3"
57
    And I should not see "Teacher: Teacher 2"
58
 
1 efrain 59
  @javascript
60
  Scenario: Search courses and move results in bulk
61
    Given I log in as "admin"
62
    And I go to the courses management page
63
    And I set the field "Search" to "Biology"
64
    And I press "Search"
65
    When I select course "Biology Y1" in the management interface
66
    And I select course "Biology Y2" in the management interface
67
    And I set the field "menumovecoursesto" to "Science"
68
    And I press "Move"
69
    Then I should see "Successfully moved 2 courses into Science"
70
    And I wait to be redirected
71
    And I click on category "Science" in the management interface
72
    And I should see "Biology Y1"
73
    And I should see "Biology Y2"