Skip to content

Commit bf3a1be

Browse files
Student e2e and quiz admin
1 parent 30bd35b commit bf3a1be

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/behat/student.feature

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@javascript @qtype_multianswerwiris @studentwiris
2+
Feature: Student answers a quiz with an Embedded answers (Cloze) (WIRIS) question
3+
#The quiz creation seems not to be working correctly. Needs to be rechecked
4+
5+
Background:
6+
Given the following "users" exist:
7+
| username | firstname | lastname | email |
8+
| student1 | Student | One | student1@example.com |
9+
And the following "courses" exist:
10+
| fullname | shortname |
11+
| Course 1 | C1 |
12+
And the following "course enrolments" exist:
13+
| user | course | role |
14+
| student1 | C1 | student |
15+
16+
And the following "activities" exist:
17+
| activity | name | course | idnumber |
18+
| quiz | WIRIS Cloze Quiz | C1 | quiz_cl |
19+
20+
And the following "question categories" exist:
21+
| contextlevel | reference | name |
22+
| Course | C1 | WIRIS bank |
23+
24+
# For Cloze, the structure lives in questiontext
25+
And the following "questions" exist:
26+
| questioncategory | qtype | name | questiontext | defaultmark |
27+
| WIRIS bank | multianswerwiris | Cloze WIRISsymbol | <p>The symbol for the speed of light is {1:SHORTANSWER:=c}.</p> | 1.0 |
28+
29+
And quiz "WIRIS Cloze Quiz" contains the following questions:
30+
| question | page |
31+
| Cloze WIRISsymbol | 1 |
32+
33+
Scenario: Student attempts and submits the Cloze (WIRIS) quiz
34+
Given I am on the "WIRIS Cloze Quiz" "mod_quiz > View" page logged in as "student1"
35+
When I press "Attempt quiz"
36+
And I set the field "1" to "c"
37+
And I click on "Finish attempt ..." "link"
38+
And I press "Submit all and finish"
39+
And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
40+
Then I should see "Review"

0 commit comments

Comments
 (0)