Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_questionnaire
2
Feature: In questionnaire, personality tests can be constructed using feedback on specific question responses.
3
  In order to define a feedback questionnaire
4
  As a teacher
5
  I must add the required question types and complete the feedback options.
6
 
7
  @javascript
8
  Scenario: Create a questionnaire with a rate question type and verify that feedback options exist.
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
      | student1 | Student | 1 | student1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And the following "activities" exist:
21
      | activity | name | description | course | idnumber | resume | navigate |
22
      | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 | 1 | 1 |
23
    And I log in as "teacher1"
24
    And I am on "Course 1" course homepage
25
    And I follow "Test questionnaire"
26
    And I navigate to "Feedback" in current page administration
27
    Then I should see "Feedback options are available if your questionnaire contains the following question types"
28
    And I follow "Questions"
29
    Then I should see "Add questions"
30
    And I add a "Dropdown Box" question and I fill the form with:
31
      | Question Name | Q1 |
32
      | Yes | y |
33
      | Question Text | Select one dropdown |
34
      | Possible answers | 1=One,2=Two,3=Three,4=Four |
35
    Then I should see "[Dropdown Box] (Q1)"
36
    And I add a "Radio Buttons" question and I fill the form with:
37
      | Question Name | Q2 |
38
      | Yes | y |
39
      | Horizontal | Checked |
40
      | Question Text | Select one radio |
41
      | Possible answers | 1=One,2=Two,3=Three,4=Four |
42
    Then I should see "[Radio Buttons] (Q2)"
43
    And I add a "Rate (scale 1..5)" question and I fill the form with:
44
      | Question Name | Q3 |
45
      | Yes | y |
46
      | Nb of scale items | 4 |
47
      | Type of rate scale | Normal |
48
      | Question Text | Rate these |
49
      | Possible answers | Cheese,Bread,Meat,Fruit |
50
      | Named degrees    | 1=One,2=Two,3=Three,4=Four |
51
    Then I should see "[Rate (scale 1..5)] (Q3)"
52
    And I add a "Yes/No" question and I fill the form with:
53
      | Question Name | Q4 |
54
      | Yes | y |
55
      | Question Text | Yes or no |
56
    Then I should see "[Yes/No] (Q4)"
57
    And I follow "Feedback"
58
    And I should see "Feedback options"
59
    And I set the field "id_feedbacksections" to "Global Feedback"
60
    And I set the field "id_feedbackscores" to "Yes"
61
    And I set the field "id_feedbacknotes" to "These are the main Feedback notes"
62
    And I press "Save settings and edit Feedback Sections"
63
    Then I should see "Global Feedback heading"
64
    And I set the field "id_sectionlabel" to "Global feedback label"
65
    And I set the field "id_sectionheading" to "Global section heading"
66
    And I set the field "id_feedbacktext_0" to "Feedback 100%"
67
    And I set the field "id_feedbackboundaries_0" to "50"
68
    And I set the field "id_feedbacktext_1" to "Feedback 50%"
69
    And I set the field "id_feedbackboundaries_1" to "20"
70
    And I set the field "id_feedbacktext_2" to "Feedback 20%"
71
    And I press "Save changes"
72
    And I log out
73
 
74
#  Scenario: Student completes feedback questions.
75
    And I log in as "student1"
76
    And I am on "Course 1" course homepage
77
    And I follow "Test questionnaire"
78
    And I navigate to "Answer the questions..." in current page administration
79
    Then I should see "Select one dropdown"
80
    And I set the field "Select one dropdown" to "Three"
81
    And I click on "Three" "radio"
82
    And I click on "Choice Three for row Cheese" "radio"
83
    And I click on "Choice Three for row Bread" "radio"
84
    And I click on "Choice Three for row Meat" "radio"
85
    And I click on "Choice Three for row Fruit" "radio"
86
    And I click on "Yes" "radio"
87
    And I press "Submit questionnaire"
88
    Then I should see "Thank you for completing this Questionnaire."
89
    And I press "Continue"
90
    Then I should see "View your response(s)"
91
    And I should see "These are the main Feedback notes"
92
    And I should see "Global feedback label"
93
    And I should see "76%"
94
    And I should see "Feedback 100%"
95
    And I log out
96
 
97
#  Scenario: Another student completes feedback questions differently.
98
    And I log in as "student1"
99
    And I am on "Course 1" course homepage
100
    And I follow "Test questionnaire"
101
    And I navigate to "Answer the questions..." in current page administration
102
    Then I should see "Select one dropdown"
103
    And I set the field "Select one dropdown" to "One"
104
    And I click on "One" "radio"
105
    And I click on "Choice Two for row Cheese" "radio"
106
    And I click on "Choice Two for row Bread" "radio"
107
    And I click on "Choice Two for row Meat" "radio"
108
    And I click on "Choice Two for row Fruit" "radio"
109
    And I click on "Yes" "radio"
110
    And I press "Submit questionnaire"
111
    Then I should see "Thank you for completing this Questionnaire."
112
    And I press "Continue"
113
    Then I should see "View your response(s)"
114
    And I should see "These are the main Feedback notes"
115
    And I should see "Global feedback label"
116
    And I should see "44%"
117
    And I should see "Feedback 50%"
118
    And I log out