Proyectos de Subversion Moodle

Rev

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

Rev Autor Línea Nro. Línea
1441 ariadna 1
Feature: Fixture to prepare scenario for testing
1 efrain 2
  Scenario: Create course content
1441 ariadna 3
    Given the following config values are set as admin:
4
      | sendcoursewelcomemessage | 0 | enrol_manual |
5
    And the following "course" exists:
1 efrain 6
      | fullname         | Course test |
7
      | shortname        | C1          |
8
      | category         | 0           |
9
      | numsections      | 3           |
10
      | initsections     | 1           |
11
    And the following "activities" exist:
12
      | activity | name              | intro                       | course   | idnumber | section | visible |
13
      | assign   | Activity sample 1 | Test assignment description | C1       | sample1  | 1       | 1       |
14
      | assign   | Activity sample 2 | Test assignment description | C1       | sample2  | 1       | 0       |
1441 ariadna 15
 
16
  @cleanup
17
  Scenario: clean course from fixture to prepare scenario for testing
18
    Given the course "Course test" is deleted
19
 
1 efrain 20
  Scenario: Create users
21
    Given the following "users" exist:
1441 ariadna 22
      | username      | firstname  | lastname | email              |
23
      | teachersample | Teacher    | Test1    | sample@example.com |
1 efrain 24
    And the following "course enrolments" exist:
25
      | user     | course   | role           |
1441 ariadna 26
      | teachersample | C1       | editingteacher |
1 efrain 27
    And "5" "users" exist with the following data:
1441 ariadna 28
      | username  | studentsample[count]             |
29
      | firstname | Student                          |
30
      | lastname  | Test[count]                      |
31
      | email     | studentsample[count]@example.com |
1 efrain 32
    And "5" "course enrolments" exist with the following data:
1441 ariadna 33
      | user   | studentsample[count] |
34
      | course | C1                   |
35
      | role   | student              |
36
 
37
  @cleanup
38
  Scenario: clean users from fixture to prepare scenario for testing
39
    Given the user "teachersample" is deleted
40
    And the user "studentsample1" is deleted
41
    And the user "studentsample2" is deleted
42
    And the user "studentsample3" is deleted
43
    And the user "studentsample4" is deleted
44
    And the user "studentsample5" is deleted