Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_lp @javascript
2
Feature: View competencies
3
  In order to access competency information
4
  As a user
5
  I need to view user competencies
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname |
10
      | student1  | Student   | first    |
11
      | teacher1  | Teacher   | first    |
12
    And the following "system role assigns" exist:
13
      | user     | role           | contextlevel |
14
      | teacher1 | editingteacher | System       |
15
    And the following "permission overrides" exist:
16
      | capability                 | permission | role           | contextlevel | reference |
17
      | moodle/competency:planview | Allow      | editingteacher | System       |           |
18
    And the following "courses" exist:
19
      | fullname | shortname |
20
      | Course 1 | C1        |
21
    And the following "course enrolments" exist:
22
      | user     | course | role           |
23
      | student1 | C1     | student        |
24
      | teacher1 | C1     | editingteacher |
25
    And the following "scales" exist:
26
      | name       | scale            |
27
      | Test Scale | Bad, Good, Great |
28
    And the following "core_competency > frameworks" exist:
29
      | shortname | idnumber | scale      |
30
      | Cookery   | cookery  | Test Scale |
31
      | Literacy  | literacy | Test Scale |
32
    And the following "core_competency > competencies" exist:
33
      | shortname      | idnumber       | description            | competencyframework |
34
      | Salads         | salads         | Salads are important   | cookery             |
35
      | Desserts       | desserts       | Desserts are important | cookery             |
36
      | Cakes          | cakes          | Cakes are important    | cookery             |
37
      | Reading        | reading        | Reading is important   | literacy            |
38
      | Writing        | writing        | Writing is important   | literacy            |
39
    And the following "core_competency > related_competencies" exist:
40
      | competency | relatedcompetency |
41
      | desserts   | cakes             |
42
    And the following "core_competency > plans" exist:
43
      | name     | description           | competencies            | user     |
44
      | Cookery  | Cookery is important  | salads, desserts, cakes | student1 |
45
      | Literacy | Literacy is important | reading, writing        | student1 |
46
    And the following "core_competency > course_competencies" exist:
47
      | course | competency |
48
      | C1     | salads     |
49
      | C1     | desserts   |
50
      | C1     | cakes      |
51
      | C1     | reading    |
52
      | C1     | writing    |
53
    And the following "core_competency > user_competency" exist:
54
      | competency | user     | grade |
55
      | salads     | student1 | Good  |
56
      | desserts   | student1 | Great |
57
      | cakes      | student1 | Great |
58
    And the following "core_competency > user_competency_courses" exist:
59
      | course | competency | user     | grade |
60
      | C1     | salads     | student1 | Good  |
61
      | C1     | desserts   | student1 | Great |
62
      | C1     | cakes      | student1 | Great |
63
 
64
  Scenario: Student view
65
    # Course competencies
66
    Given I am on the "C1" "tool_lp > course competencies" page logged in as "student1"
67
    Then I should see "You are proficient in 3 out of 5 competencies in this course"
68
 
69
    And "Salads are important" "tool_lp > competency description" should exist in the "Salads" "tool_lp > competency"
70
    And "Good" "tool_lp > competency grade" should exist in the "Salads" "tool_lp > competency"
71
 
72
    And "Desserts are important" "tool_lp > competency description" should exist in the "Desserts" "tool_lp > competency"
73
    And "Great" "tool_lp > competency grade" should exist in the "Desserts" "tool_lp > competency"
74
 
75
    And "Cakes are important" "tool_lp > competency description" should exist in the "Cakes" "tool_lp > competency"
76
    And "Great" "tool_lp > competency grade" should exist in the "Cakes" "tool_lp > competency"
77
 
78
    And "Reading is important" "tool_lp > competency description" should exist in the "Reading" "tool_lp > competency"
79
    And "Good" "tool_lp > competency grade" should not exist in the "Reading" "tool_lp > competency"
80
    And "Great" "tool_lp > competency grade" should not exist in the "Reading" "tool_lp > competency"
81
    And "Bad" "tool_lp > competency grade" should not exist in the "Reading" "tool_lp > competency"
82
 
83
    And "Writing is important" "tool_lp > competency description" should exist in the "Writing" "tool_lp > competency"
84
    And "Good" "tool_lp > competency grade" should not exist in the "Writing" "tool_lp > competency"
85
    And "Great" "tool_lp > competency grade" should not exist in the "Writing" "tool_lp > competency"
86
    And "Bad" "tool_lp > competency grade" should not exist in the "Writing" "tool_lp > competency"
87
 
88
    # Course competencies details
89
    And I click on "Desserts" "link" in the "Desserts" "tool_lp > competency"
90
    And I should see "Desserts are important"
91
    And "Yes" "tool_lp > competency page proficiency" should exist
92
    And "Great" "tool_lp > competency page rating" should exist
93
 
94
    # Course competencies summary
95
    And I click on "Cakes" "link"
96
    And I should see "Cakes are important"
97
 
98
    # Learning plans
99
    And I click on "Close" "button" in the "Cakes" "dialogue"
100
    And I follow "Profile" in the user menu
101
    And I click on "Learning plans" "link"
102
    And I should see "Cookery"
103
    And I should see "Literacy"
104
 
105
    # Learning plans details
106
    And I click on "Cookery" "link"
107
    And I should see "Cookery is important"
108
    And I should see "3 out of 3 competencies are proficient"
109
 
110
    And "Good" "tool_lp > learning plan rating" should exist in the "Salads" "tool_lp > learning plan"
111
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Salads" "tool_lp > learning plan"
112
 
113
    And "Great" "tool_lp > learning plan rating" should exist in the "Desserts" "tool_lp > learning plan"
114
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Desserts" "tool_lp > learning plan"
115
 
116
    And "Great" "tool_lp > learning plan rating" should exist in the "Cakes" "tool_lp > learning plan"
117
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Cakes" "tool_lp > learning plan"
118
 
119
    And I should not see "Literacy"
120
    And I should not see "Reading"
121
    And I should not see "Writing"
122
 
123
    # Learning plans competency details
124
    And I click on "Desserts" "link" in the "Desserts" "tool_lp > learning plan"
125
    And I should see "Desserts are important"
126
    And "Yes" "tool_lp > competency page proficiency" should exist
127
    And "Great" "tool_lp > competency page rating" should exist
128
 
129
    # Learning plans competency summary
130
    And I click on "Cakes cakes" "link"
131
    And I should see "Cakes are important"
132
 
133
  Scenario: Teacher view
134
    # Participant competencies
135
    Given I am on the "C1" "report_competency > breakdown" page logged in as "teacher1"
136
    Then I should see "Student first"
137
    And "Good" "report_competency > breakdown rating" should exist in the "Salads" "report_competency > breakdown"
138
    And "Great" "report_competency > breakdown rating" should exist in the "Desserts" "report_competency > breakdown"
139
    And "Great" "report_competency > breakdown rating" should exist in the "Cakes" "report_competency > breakdown"
140
    And "Not rated" "report_competency > breakdown rating" should exist in the "Reading" "report_competency > breakdown"
141
    And "Not rated" "report_competency > breakdown rating" should exist in the "Writing" "report_competency > breakdown"
142
 
143
    # Participant competencies details
144
    And I click on "Great" "report_competency > breakdown rating" in the "Desserts" "report_competency > breakdown"
145
    And "Yes" "tool_lp > competency page proficiency" should exist
146
    And "Great" "tool_lp > competency page rating" should exist
147
 
148
    # Participant competencies summary
149
    And I click on "Cakes" "tool_lp > competency page related competency"
150
    And I should see "Cakes are important"
151
 
152
    # Participant learning plans
153
    And I click on "Close" "button" in the "Cakes" "dialogue"
154
    And I click on "Close" "button" in the "User competency summary" "dialogue"
155
    And I navigate to course participants
156
    And I click on "Student first" "link"
157
    And I click on "Learning plans" "link"
158
    And I should see "Cookery"
159
    And I should see "Literacy"
160
 
161
    # Participant learning plans details
162
    And I click on "Cookery" "link"
163
    And I should see "Cookery is important"
164
    And I should see "3 out of 3 competencies are proficient"
165
 
166
    And "Good" "tool_lp > learning plan rating" should exist in the "Salads" "tool_lp > learning plan"
167
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Salads" "tool_lp > learning plan"
168
 
169
    And "Great" "tool_lp > learning plan rating" should exist in the "Desserts" "tool_lp > learning plan"
170
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Desserts" "tool_lp > learning plan"
171
 
172
    And "Great" "tool_lp > learning plan rating" should exist in the "Cakes" "tool_lp > learning plan"
173
    And "Yes" "tool_lp > learning plan proficiency" should exist in the "Cakes" "tool_lp > learning plan"
174
 
175
    And I should not see "Literacy"
176
    And I should not see "Reading"
177
    And I should not see "Writing"
178
 
179
    # Learning plans competency details
180
    And I click on "Desserts" "link"
181
    And I should see "Desserts are important"
182
    And "Yes" "tool_lp > competency page proficiency" should exist
183
    And "Great" "tool_lp > competency page rating" should exist
184
 
185
    # Learning plans competency summary
186
    And I click on "Cakes" "tool_lp > competency page related competency"
187
    And I should see "Cakes are important"