[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/type/multichoice/tests/behat/ -> add.feature (source)

   1  @qtype @qtype_multichoice
   2  Feature: Test creating a Multiple choice question
   3    As a teacher
   4    In order to test my students
   5    I need to be able to create a Multiple choice question
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email               |
  10        | teacher1 | T1        | Teacher1 | teacher1@moodle.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 I log in as "teacher1"
  18      And I follow "Course 1"
  19      And I navigate to "Question bank" node in "Course administration"
  20  
  21    Scenario: Create a Multiple choice question with multiple response
  22      When I add a "Multiple choice" question filling the form with:
  23        | Question name            | Multi-choice-001                   |
  24        | Question text            | Find the capital cities in Europe. |
  25        | General feedback         | Paris and London                   |
  26        | One or multiple answers? | Multiple answers allowed           |
  27        | Choice 1                 | Tokyo                              |
  28        | Choice 2                 | Spain                              |
  29        | Choice 3                 | London                             |
  30        | Choice 4                 | Barcelona                          |
  31        | Choice 5                 | Paris                              |
  32        | id_fraction_0            | None                               |
  33        | id_fraction_1            | None                               |
  34        | id_fraction_2            | 50%                                |
  35        | id_fraction_3            | None                               |
  36        | id_fraction_4            | 50%                                |
  37        | Hint 1                   | First hint                         |
  38        | Hint 2                   | Second hint                        |
  39      Then I should see "Multi-choice-001"
  40  
  41    Scenario: Create a Multiple choice question with single response
  42      When I add a "Multiple choice" question filling the form with:
  43        | Question name            | Multi-choice-002                       |
  44        | Question text            | Find the capital city of England.      |
  45        | General feedback         | London is the capital city of England. |
  46        | One or multiple answers? | One answer only                        |
  47        | Choice 1                 | Manchester                             |
  48        | Choice 2                 | Buckingham                             |
  49        | Choice 3                 | London                                 |
  50        | Choice 4                 | Barcelona                              |
  51        | Choice 5                 | Paris                                  |
  52        | id_fraction_0            | None                                   |
  53        | id_fraction_1            | None                                   |
  54        | id_fraction_2            | 100%                                   |
  55        | id_fraction_3            | None                                   |
  56        | id_fraction_4            | None                                   |
  57        | Hint 1                   | First hint                             |
  58        | Hint 2                   | Second hint                            |
  59      Then I should see "Multi-choice-002"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1