@@ -19,32 +19,32 @@ Feature: View activity completion information in the questionnaire activity
19
19
And the following "activities" exist:
20
20
| activity | name | introduction | course | idnumber | completion | completionview | completionpostsenabled | completionposts |
21
21
| questionnaire | Test questionnaire completion | Test questionnaire description | C1 | questionnaire2 | 2 | 1 | 1 | 1 |
22
-
23
- @javascript
24
- Scenario : Check questionnaire completion feature in web.
25
- Given I log in as "teacher1"
22
+ And I log in as "teacher1"
26
23
And I am on "Course 1" course homepage
27
24
And I follow "Test questionnaire completion"
28
- Then I click on "Add questions" "link"
25
+ And I click on "Add questions" "link"
29
26
And I add a "Yes/No" question and I fill the form with:
30
27
| Question Name | Q1 |
31
28
| Yes | y |
32
29
| Question Text | Are you still in School ? |
33
- Then I should see "[Yes/No] (Q1)"
34
30
And I add a "Radio Buttons" question and I fill the form with:
35
31
| Question Name | Q2 |
36
32
| Yes | y |
37
33
| Horizontal | Checked |
38
34
| Question Text | Select one choice |
39
35
| Possible answers | 1 =One ,2 =Two ,3 =Three ,4 =Four |
40
- Then I should see "[Radio Buttons] (Q2)"
41
36
And I add a "Text Box" question and I fill the form with:
42
37
| Question Name | Q8 |
43
38
| No | n |
44
39
| Input box length | 10 |
45
40
| Max . text length | 15 |
46
41
| Question Text | Enter some text |
47
- Then I should see "[Text Box] (Q8)"
42
+
43
+ @javascript
44
+ Scenario : Check questionnaire completion feature in web for Moodle ≤ 4.2.
45
+ Given the site is running Moodle version 4.2 or lower
46
+ And I log in as "teacher1"
47
+ And I am on "Course 1" course homepage
48
48
And I am on the "Test questionnaire completion" "questionnaire activity editing" page
49
49
And I set the following fields to these values:
50
50
| Completion tracking | Show activity as complete when conditions are met |
@@ -65,3 +65,29 @@ Feature: View activity completion information in the questionnaire activity
65
65
Then I should see "Thank you for completing this Questionnaire."
66
66
And I press "Continue"
67
67
Then I should see "View your response(s)"
68
+
69
+ Scenario : Check questionnaire completion feature in web for Moodle ≥ 4.3.
70
+ Given the site is running Moodle version 4.3 or higher
71
+ And I log in as "teacher1"
72
+ And I am on "Course 1" course homepage
73
+ And I am on the "Test questionnaire completion" "questionnaire activity editing" page
74
+ And I click on "Expand all" "link" in the "region-main" "region"
75
+ And I set the following fields to these values:
76
+ | Add requirements | 1 |
77
+ | Student must submit this questionnaire to complete it | 1 |
78
+ And I press "Save and display"
79
+
80
+ And I am on the "Test questionnaire completion" "questionnaire activity" page
81
+ Then I should see "You are not eligible to take this questionnaire."
82
+
83
+ And I am on the "Test questionnaire completion" "questionnaire activity" page logged in as "student1"
84
+ And I click on "Answer the questions..." "link"
85
+ Then I should see "Are you still in School?"
86
+ And I should see "Select one choice"
87
+ And I should see "Enter some text"
88
+ And I set the field "Yes" to "1"
89
+ And I set the field "Three" to "1"
90
+ And I press "Submit questionnaire"
91
+ Then I should see "Thank you for completing this Questionnaire."
92
+ And I press "Continue"
93
+ Then I should see "View your response(s)"
0 commit comments