HEX
Server: LiteSpeed
System: Linux server.zepintelhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: enamadmin (1026)
PHP: 8.2.30
Disabled: exec,system,passthru,shell_exec,proc_open,popen,apache_child_terminate
Upload Files
File: /home/enamadmin/public_html/aaelearningb/mod/quiz/tests/behat/settings_form_validation.feature
@mod @mod_quiz
Feature: Settings form fields are validated
  To help me avoid mistakes
  As a teacher
  I need the quiz settings to be validated

  Background:
    Given the following "users" exist:
      | username | firstname |
      | teacher  | Teach     |
    And the following "courses" exist:
      | fullname | shortname | category |
      | Course 1 | C1        | 0        |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher  | C1     | editingteacher |
    And the following "activities" exist:
      | activity | course | section | name        |
      | quiz     | C1     | 1       | Test quiz 1 |

  Scenario: Negative time limits are not allowed
    When I am on the "Test quiz 1" "quiz activity editing" page logged in as teacher
    And I expand all fieldsets
    And I set the following fields to these values:
      | id_timelimit_enabled | 1   |
      | id_timelimit_number  | -10 |
    And I press "Save and display"
    Then I should see "This duration cannot be negative"