8133a892b6d9a39b03811dfe45b18180b5a1c964
[moodle.git] / question / type / numerical / tests / behat / add.feature
1 @qtype @qtype_numerical
2 Feature: Test creating a Numerical question
3   As a teacher
4   In order to test my students
5   I need to be able to create a Numerical question
7   Background:
8     Given the following "users" exist:
9       | username | firstname | lastname | email               |
10       | teacher1 | T1        | Teacher1 | teacher1@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       | teacher1 | C1     | editingteacher |
17     And the following "language customisations" exist:
18       | component       | stringid | value |
19       | core_langconfig | decsep   | #     |
20     And I log in as "teacher1"
21     And I am on "Course 1" course homepage
22     And I navigate to "Question bank" in current page administration
24   Scenario: Create a Numerical question
25     When I add a "Numerical" question filling the form with:
26       | Question name                      | Numerical-001                          |
27       | Question text                      | What is the average of 4, 5, 6 and 10? |
28       | Default mark                       | 1                                      |
29       | General feedback                   | The average is 6.25                    |
30       | id_answer_0                        | 6.25                                   |
31       | id_tolerance_0                     | 0.05                                   |
32       | id_fraction_0                      | 100%                                   |
33       | id_answer_1                        | 2#25                                   |
34       | id_tolerance_1                     | 0#05                                   |
35       | id_fraction_1                      | 0%                                     |
36       | id_answer_2                        | 5,1                                    |
37       | id_tolerance_2                     | 0                                      |
38       | id_fraction_2                      | 100%                                   |
39     Then I should see "Numerical-001"