1441 |
ariadna |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Attempt a quiz in secure layout
|
|
|
3 |
As a student
|
|
|
4 |
In order to demonstrate what I know
|
|
|
5 |
I need to be able to attempt quizzes in secure layout
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student | Student | One | student@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| student | C1 | student |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | intro | course | idnumber | grade | navmethod | browsersecurity | showuserpicture |
|
|
|
19 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 100 | free | securewindow | 2 |
|
|
|
20 |
And the following "question categories" exist:
|
|
|
21 |
| contextlevel | reference | name |
|
|
|
22 |
| Activity module | quiz1 | Test questions |
|
|
|
23 |
And the following "questions" exist:
|
|
|
24 |
| questioncategory | qtype | name | questiontext |
|
|
|
25 |
| Test questions | truefalse | TF1 | First question |
|
|
|
26 |
| Test questions | truefalse | TF2 | Second question |
|
|
|
27 |
And quiz "Quiz 1" contains the following questions:
|
|
|
28 |
| question | page | maxmark |
|
|
|
29 |
| TF1 | 1 | |
|
|
|
30 |
| TF2 | 1 | 3.0 |
|
|
|
31 |
|
|
|
32 |
@javascript
|
|
|
33 |
Scenario: Large user image in the quiz navigation in secure layout
|
|
|
34 |
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
|
|
35 |
And I press "Attempt quiz"
|
|
|
36 |
And I switch to a second window
|
|
|
37 |
Then "Student One" "link" should not exist in the "Quiz navigation" "block"
|
|
|
38 |
|
|
|
39 |
Scenario: A quiz page on the secure layout shows both the course name and the quiz name
|
|
|
40 |
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
|
|
41 |
And I should see "Quiz 1"
|
|
|
42 |
And I should see "Quiz 1 description"
|
|
|
43 |
When I press "Attempt quiz"
|
|
|
44 |
Then I should see "Course 1"
|
|
|
45 |
And I should see "Quiz 1"
|
|
|
46 |
But I should not see "Quiz 1 description"
|