[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_feedback 2 Feature: Non anonymous feedback 3 In order to collect feedbacks 4 As an teacher 5 I need to be able to create and collect feedbacks 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | 10 | user1 | Username | 1 | 11 | user2 | Username | 2 | 12 | teacher | Teacher | 3 | 13 | manager | Manager | 4 | 14 And the following "courses" exist: 15 | fullname | shortname | 16 | Course 1 | C1 | 17 And the following "course enrolments" exist: 18 | user | course | role | 19 | user1 | C1 | student | 20 | user2 | C1 | student | 21 | teacher | C1 | editingteacher | 22 And the following "system role assigns" exist: 23 | user | course | role | 24 | manager | Acceptance test site | manager | 25 And the following "activities" exist: 26 | activity | name | course | idnumber | anonymous | publish_stats | 27 | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 28 | feedback | Course feedback | C1 | feedback1 | 2 | 1 | 29 When I log in as "manager" 30 And I am on site homepage 31 And I follow "Site feedback" 32 And I follow "Edit questions" 33 And I add a "Multiple choice" question to the feedback with: 34 | Question | Do you like our site? | 35 | Label | multichoice2 | 36 | Multiple choice type | Multiple choice - single answer | 37 | Hide the "Not selected" option | Yes | 38 | Multiple choice values | Yes of course\nNot at all\nI don't know | 39 And I log out 40 41 Scenario: Guests can see non anonymous feedback on front page but can not complete 42 When I follow "Site feedback" 43 Then I should not see "Answer the questions..." 44 And I follow "Preview" 45 And I should see "Do you like our site?" 46 And I press "Continue" 47 48 Scenario: Complete non anonymous feedback on the front page as an authenticated user 49 And I log in as "user1" 50 And I am on site homepage 51 When I follow "Site feedback" 52 And I follow "Preview" 53 And I should see "Do you like our site?" 54 And I press "Continue" 55 And I follow "Answer the questions..." 56 And I should see "Do you like our site?" 57 And I set the following fields to these values: 58 | Yes of course | 1 | 59 And I press "Submit your answers" 60 And I should not see "Submitted answers" 61 And I press "Continue" 62 63 @javascript 64 Scenario: Complete non anonymous feedback and view analysis on the front page as an authenticated user 65 And I log in as "admin" 66 And I set the following system permissions of "Authenticated user on frontpage" role: 67 | capability | permission | 68 | mod/feedback:viewanalysepage | Allow | 69 And I log out 70 And I log in as "user1" 71 And I am on site homepage 72 When I follow "Site feedback" 73 And I follow "Answer the questions..." 74 And I should see "Do you like our site?" 75 And I set the following fields to these values: 76 | Yes of course | 1 | 77 And I press "Submit your answers" 78 And I log out 79 And I log in as "user2" 80 And I am on site homepage 81 When I follow "Site feedback" 82 And I follow "Answer the questions..." 83 And I set the following fields to these values: 84 | Not at all | 1 | 85 And I press "Submit your answers" 86 And I follow "Submitted answers" 87 And I should see "Submitted answers: 2" 88 And I should see "Questions: 1" 89 # And I should not see "multichoice2" # TODO MDL-29303 do not show labels to users who can not edit feedback 90 And I show chart data for the "multichoice2" feedback 91 And I should see "Do you like our site?" 92 And I should see "1 (50.00 %)" in the "Yes of course" "table_row" 93 And I should see "1 (50.00 %)" in the "Not at all" "table_row" 94 And I should not see "Show responses" 95 And I log out 96 And I log in as "manager" 97 And I am on site homepage 98 And I follow "Site feedback" 99 And I follow "Show responses" 100 And I should see "Username" 101 And I should see "Non anonymous entries (2)" 102 And I should not see "Anonymous entries" 103 And I click on "," "link" in the "Username 1" "table_row" 104 And I should see "(Username 1)" 105 And I should see "Yes of course" 106 And I follow "Back" 107 And I log out 108 109 @javascript 110 Scenario: Non anonymous feedback in a course 111 When I log in as "teacher" 112 And I follow "Course 1" 113 And I follow "Course feedback" 114 And I follow "Edit questions" 115 And I add a "Multiple choice" question to the feedback with: 116 | Question | Do you like this course? | 117 | Label | multichoice1 | 118 | Multiple choice type | Multiple choice - single answer | 119 | Hide the "Not selected" option | Yes | 120 | Multiple choice values | Yes of course\nNot at all\nI don't know | 121 And I log out 122 And I log in as "user1" 123 And I follow "Course 1" 124 And I follow "Course feedback" 125 And I follow "Answer the questions..." 126 And I should see "Do you like this course?" 127 And I set the following fields to these values: 128 | Yes of course | 1 | 129 And I press "Submit your answers" 130 And I log out 131 And I log in as "user2" 132 And I follow "Course 1" 133 And I follow "Course feedback" 134 And I follow "Answer the questions..." 135 And I should see "Do you like this course?" 136 And I set the following fields to these values: 137 | Not at all | 1 | 138 And I press "Submit your answers" 139 And I follow "Submitted answers" 140 And I should see "Submitted answers: 2" 141 And I should see "Questions: 1" 142 # And I should not see "multichoice2" # TODO MDL-29303 143 And I show chart data for the "multichoice1" feedback 144 And I should see "Do you like this course?" 145 And I should see "1 (50.00 %)" in the "Yes of course" "table_row" 146 And I should see "1 (50.00 %)" in the "Not at all" "table_row" 147 And I log out 148 And I log in as "teacher" 149 And I follow "Course 1" 150 And I follow "Course feedback" 151 And I follow "Preview" 152 And I should see "Do you like this course?" 153 And I press "Continue" 154 And I should not see "Answer the questions..." 155 And I follow "Show responses" 156 And I should see "Non anonymous entries (2)" 157 And I should not see "Anonymous" 158 And I click on "," "link" in the "Username 1" "table_row" 159 And I should see "(Username 1)" 160 And I should see "Yes of course" 161 And I should not see "Prev" 162 And I follow "Next" 163 And I should see "(Username 2)" 164 And I should not see "Next" 165 And I should see "Prev" 166 And I follow "Back" 167 # Delete non anonymous response 168 And I click on "Delete entry" "link" in the "Username 1" "table_row" 169 And I press "Yes" 170 And I should see "Non anonymous entries (1)" 171 And I should not see "Username 1" 172 And I should see "Username 2" 173 And I log out
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |