Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_customcert
2
Feature: Being able to view the certificates that have been issued
3
  In order to ensure that a user can view the certificates that have been issued
4
  As a teacher
5
  I need to view the certificates that have been issued
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1        | 0        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com |
14
      | student1 | Student   | 1        | student1@example.com |
15
      | student2 | Student   | 2        | student2@example.com |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | teacher1 | C1     | editingteacher |
19
      | student1 | C1     | student        |
20
      | student2 | C1     | student        |
21
    And the following "activities" exist:
22
      | activity   | name                 | intro                      | course | idnumber    |
23
      | customcert | Custom certificate 1 | Custom certificate 1 intro | C1     | customcert1 |
24
    And the following config values are set as admin:
25
      | showuseridentity | username,email |
26
 
27
  Scenario: View the issued certificates
28
    And I log in as "student1"
29
    And I am on "Course 1" course homepage
30
    And I follow "Custom certificate 1"
31
    And I press "View certificate"
32
    And I log out
33
    And I log in as "student2"
34
    And I am on "Course 1" course homepage
35
    And I follow "Custom certificate 1"
36
    And I press "View certificate"
37
    And I log out
38
    And I log in as "teacher1"
39
    And I am on "Course 1" course homepage
40
    And I follow "Custom certificate 1"
41
    And I should see "Student 1"
42
    And I should see "Student 2"
43
    And I should see "Email address"
44
    And I should see "Username"
45
    And "Student 1" row "Email address" column of "generaltable" table should contain "student1@example.com"
46
    And "Student 1" row "Username" column of "generaltable" table should contain "student1"
47
    And "Student 2" row "Email address" column of "generaltable" table should contain "student2@example.com"
48
    And "Student 2" row "Username" column of "generaltable" table should contain "student2"
49
 
50
  Scenario: Delete an issued certificate
51
    And I log in as "student1"
52
    And I am on "Course 1" course homepage
53
    And I follow "Custom certificate 1"
54
    And I press "View certificate"
55
    And I log out
56
    And I log in as "student2"
57
    And I am on "Course 1" course homepage
58
    And I follow "Custom certificate 1"
59
    And I press "View certificate"
60
    And I log out
61
    And I log in as "teacher1"
62
    And I am on "Course 1" course homepage
63
    And I follow "Custom certificate 1"
64
    And I should see "Student 1"
65
    And I should see "Student 2"
66
    And I click on ".delete-icon" "css_element" in the "Student 2" "table_row"
67
    And I press "Cancel"
68
    And I should see "Student 1"
69
    And I should see "Student 2"
70
    And I click on ".delete-icon" "css_element" in the "Student 2" "table_row"
71
    And I press "Continue"
72
    And I should see "Student 1"
73
    And I should not see "Student 2"