aboutsummaryrefslogtreecommitdiff
path: root/tests/behat/add.feature
blob: 606e05f63d46f8ebd8bb52bab1b8c285132416e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@qtype @qtype_algebra
Feature: Test creating an Algebra question
  As a teacher
  In order to test my students
  I need to be able to create an Algebra question

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email               |
      | teacher1 | T1        | Teacher1 | teacher1@moodle.com |
    And the following "courses" exist:
      | fullname | shortname | category |
      | Course 1 | C1        | 0        |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher1 | C1     | editingteacher |
    And I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I navigate to "Question bank" in current page administration

  Scenario: Create an Algebra question
    When I add a "Algebra" question filling the form with:
      | Question name        | algebra-001                               |
      | Question text        | What is the derivative of f(x) = x^2 ?    |
      | General feedback     | The correct answer is 2*x                 |
      | Default mark         | 1                                         |
      | id_variable_0        | x                                         |
      | id_varmin_0          | -5                                        |
      | id_varmax_0          | 5                                         |
      | id_answer_0          | 2*x                                       |
      | id_fraction_0        | 100%                                      |
      | id_feedback_0        | Well done. 2*x is correct.                |
      | id_answer_1          | x                                         |
      | id_fraction_1        | 20%                                       |
      | id_feedback_1        | It seems that you forgot something.       |
    Then I should see "algebra-001"