[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @qtype @qtype_multichoice
   2  Feature: Test editing a Multiple choice question
   3    As a teacher
   4    In order to be able to update my Multiple choice question
   5    I need to edit them
   6  
   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 "question categories" exist:
  18        | contextlevel | reference | name           |
  19        | Course       | C1        | Test questions |
  20      And the following "questions" exist:
  21        | questioncategory | qtype       | name                        | template    |
  22        | Test questions   | multichoice | Multiple choice for editing | two_of_four |
  23        | Test questions   | multichoice | Single choice for editing   | one_of_four |
  24      And I log in as "teacher1"
  25      And I follow "Course 1"
  26      And I navigate to "Question bank" node in "Course administration"
  27  
  28    Scenario: Edit a Multiple choice question with multiple response (checkboxes)
  29      When I click on "Edit" "link" in the "Multiple choice for editing" "table_row"
  30      And I set the following fields to these values:
  31        | Question name | |
  32      And I press "id_submitbutton"
  33      Then I should see "You must supply a value here."
  34      When I set the following fields to these values:
  35        | Question name | Edited Multiple choice name |
  36      And I press "id_submitbutton"
  37      Then I should see "Edited Multiple choice name"
  38  
  39    Scenario: Edit a Multiple choice question with single response (radio buttons)
  40      When I click on "Edit" "link" in the "Single choice for editing" "table_row"
  41      And I set the following fields to these values:
  42        | Question name | Edited Single choice name |
  43      And I press "id_submitbutton"
  44      Then I should see "Edited Single choice name"


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