1441 |
ariadna |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Settings form fields are validated
|
|
|
3 |
To help me avoid mistakes
|
|
|
4 |
As a teacher
|
|
|
5 |
I need the quiz settings to be validated
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname |
|
|
|
10 |
| teacher | Teach |
|
|
|
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 |
| teacher | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | course | section | name |
|
|
|
19 |
| quiz | C1 | 1 | Test quiz 1 |
|
|
|
20 |
|
|
|
21 |
Scenario: Negative time limits are not allowed
|
|
|
22 |
When I am on the "Test quiz 1" "quiz activity editing" page logged in as teacher
|
|
|
23 |
And I expand all fieldsets
|
|
|
24 |
And I set the following fields to these values:
|
|
|
25 |
| id_timelimit_enabled | 1 |
|
|
|
26 |
| id_timelimit_number | -10 |
|
|
|
27 |
And I press "Save and display"
|
|
|
28 |
Then I should see "This duration cannot be negative"
|