1441 |
ariadna |
1 |
@mod @mod_feedback
|
|
|
2 |
Feature: Testing overview integration in mod_feedback
|
|
|
3 |
In order to list all feedbacks in a course
|
|
|
4 |
As a user
|
|
|
5 |
I need to be able to see the feedback overview
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| student1 | Username | 1 |
|
|
|
11 |
| student2 | Username | 2 |
|
|
|
12 |
| student3 | Username | 3 |
|
|
|
13 |
| student4 | Username | 4 |
|
|
|
14 |
| student5 | Username | 5 |
|
|
|
15 |
| student6 | Username | 6 |
|
|
|
16 |
| student7 | Username | 7 |
|
|
|
17 |
| student8 | Username | 8 |
|
|
|
18 |
| teacher1 | Teacher | T |
|
|
|
19 |
And the following "courses" exist:
|
|
|
20 |
| fullname | shortname | groupmode |
|
|
|
21 |
| Course 1 | C1 | 1 |
|
|
|
22 |
And the following "course enrolments" exist:
|
|
|
23 |
| user | course | role |
|
|
|
24 |
| student1 | C1 | student |
|
|
|
25 |
| student2 | C1 | student |
|
|
|
26 |
| student3 | C1 | student |
|
|
|
27 |
| student4 | C1 | student |
|
|
|
28 |
| student5 | C1 | student |
|
|
|
29 |
| student6 | C1 | student |
|
|
|
30 |
| student7 | C1 | student |
|
|
|
31 |
| student8 | C1 | student |
|
|
|
32 |
| teacher1 | C1 | editingteacher |
|
|
|
33 |
And the following "activities" exist:
|
|
|
34 |
| activity | name | course | idnumber | timeclose |
|
|
|
35 |
| feedback | Date feedback | C1 | feedback1 | ##1 Jan 2040 08:00## |
|
|
|
36 |
| feedback | Not responded feedback | C1 | feedback2 | ##1 Jan 2040 08:00## |
|
|
|
37 |
| feedback | No date feedback | C1 | feedback3 | |
|
|
|
38 |
Given the following "mod_feedback > question" exists:
|
|
|
39 |
| activity | feedback1 |
|
|
|
40 |
| name | Do you like this course? |
|
|
|
41 |
| questiontype | multichoice |
|
|
|
42 |
| label | multichoice1 |
|
|
|
43 |
| subtype | r |
|
|
|
44 |
| hidenoselect | 1 |
|
|
|
45 |
| values | Yes of course\nNot at all\nI don't know |
|
|
|
46 |
And the following "mod_feedback > responses" exist:
|
|
|
47 |
| activity | user | Do you like this course? |
|
|
|
48 |
| feedback1 | student1 | Not at all |
|
|
|
49 |
| feedback1 | student2 | I don't know |
|
|
|
50 |
| feedback1 | student3 | Not at all |
|
|
|
51 |
| feedback1 | student4 | Yes of course |
|
|
|
52 |
| feedback3 | student1 | Not at all |
|
|
|
53 |
| feedback3 | student2 | I don't know |
|
|
|
54 |
| feedback3 | student3 | Not at all |
|
|
|
55 |
|
|
|
56 |
Scenario: Teacher can see the feedback relevant information in the feedback overview
|
|
|
57 |
When I am on the "Course 1" "course > activities > feedback" page logged in as "teacher1"
|
|
|
58 |
Then I should see "Responses" in the "feedback_overview_collapsible" "region"
|
|
|
59 |
And I should not see "Responded" in the "feedback_overview_collapsible" "region"
|
|
|
60 |
And I should see "Allow answers until" in the "feedback_overview_collapsible" "region"
|
|
|
61 |
And I should see "1 January 2040" in the "Date feedback" "table_row"
|
|
|
62 |
And I should see "4 of 8" in the "Date feedback" "table_row"
|
|
|
63 |
And I should see "1 January 2040" in the "Not responded feedback" "table_row"
|
|
|
64 |
And I should see "0 of 8" in the "Not responded feedback" "table_row"
|
|
|
65 |
And I should see "-" in the "No date feedback" "table_row"
|
|
|
66 |
And I should see "3 of 8" in the "No date feedback" "table_row"
|
|
|
67 |
And I click on "4 of 8" "link" in the "Date feedback" "table_row"
|
|
|
68 |
And I should see "Show responses"
|
|
|
69 |
|
|
|
70 |
Scenario: Students can see the feedback relevant information in the feedback overview
|
|
|
71 |
When I am on the "Course 1" "course > activities > feedback" page logged in as "student1"
|
|
|
72 |
Then I should not see "Responses" in the "feedback_overview_collapsible" "region"
|
|
|
73 |
And I should see "Responded" in the "feedback_overview_collapsible" "region"
|
|
|
74 |
And I should see "Allow answers until" in the "feedback_overview_collapsible" "region"
|
|
|
75 |
And I should see "1 January 2040" in the "Date feedback" "table_row"
|
|
|
76 |
And "You have already submitted this feedback" "icon" should exist in the "Date feedback" "table_row"
|
|
|
77 |
And I should see "1 January 2040" in the "Not responded feedback" "table_row"
|
|
|
78 |
And I should see "-" in the "Not responded feedback" "table_row"
|
|
|
79 |
And I should see "-" in the "No date feedback" "table_row"
|
|
|
80 |
And "You have already submitted this feedback" "icon" should exist in the "No date feedback" "table_row"
|
|
|
81 |
|
|
|
82 |
Scenario: The feedback overview report should generate log events
|
|
|
83 |
Given I am on the "Course 1" "course > activities > feedback" page logged in as "teacher1"
|
|
|
84 |
When I am on the "Course 1" "course" page logged in as "teacher1"
|
|
|
85 |
And I navigate to "Reports" in current page administration
|
|
|
86 |
And I click on "Logs" "link"
|
|
|
87 |
And I click on "Get these logs" "button"
|
|
|
88 |
Then I should see "Course activities overview page viewed"
|
|
|
89 |
And I should see "viewed the instance list for the module 'feedback'"
|