[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/choice/tests/behat/ -> add_choice.feature (source)

   1  @mod @mod_choice
   2  Feature: Add choice activity
   3    In order to ask questions as a choice of multiple responses
   4    As a teacher
   5    I need to add choice activities to courses
   6  
   7    Scenario: Add a choice activity and complete the activity as a student
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11        | student1 | Student | 1 | student1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | category |
  14        | Course 1 | C1 | 0 |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19      And I log in as "teacher1"
  20      And I follow "Course 1"
  21      And I turn editing mode on
  22      And I add a "Choice" to section "1" and I fill the form with:
  23        | Choice name | Choice name |
  24        | Description | Choice Description |
  25        | option[0] | Option 1 |
  26        | option[1] | Option 2 |
  27      And I log out
  28      When I log in as "student1"
  29      And I follow "Course 1"
  30      And I choose "Option 1" from "Choice name" choice activity
  31      Then I should see "Your selection: Option 1"
  32      And I should see "Your choice has been saved"


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