[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/lesson/tests/behat/ -> time_limit.feature (source)

   1  @mod @mod_lesson
   2  Feature: A teacher can set a time limit for a lesson
   3    In order to restrict the time students have to complete a lesson
   4    As a teacher
   5    I need to set a time limit
   6  
   7    @javascript
   8    Scenario: Accessing as student to a lesson with time limit
   9      Given the following "users" exist:
  10        | username | firstname | lastname | email |
  11        | teacher1 | Teacher | 1 | teacher1@example.com |
  12        | student1 | Student | 1 | student1@example.com |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course 1 | C1 | 0 |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20      And I log in as "teacher1"
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "Lesson" to section "1" and I fill the form with:
  24        | Name | Test lesson |
  25        | Description | Test lesson description |
  26        | timelimit[enabled] | 1 |
  27        | timelimit[timeunit] | 60 |
  28        | timelimit[number]   | 1  |
  29      And I follow "Test lesson"
  30      And I follow "Add a content page"
  31      And I set the following fields to these values:
  32        | Page title | Lesson page name |
  33        | Page contents | Single lesson page contents |
  34        | Description | Single button |
  35      And I press "Save page"
  36      And I log out
  37      And I log in as "student1"
  38      And I follow "Course 1"
  39      When I follow "Test lesson"
  40      Then I should see "You have 1 min to finish the lesson."
  41      And I wait "3" seconds
  42      And I should see "Time remaining"
  43      And I press "Single button"
  44      And I should see "0:00:"
  45      And I should see "Warning: You have 1 minute or less to finish the lesson."
  46      And I wait "60" seconds
  47      And I press "Single button"
  48      And I should see "You ran out of time for this lesson."
  49      And I should see "Your last answer may not have counted if it was answered after the time was up."
  50      And I should see "Congratulations - end of lesson reached"
  51      And I should not see "Single lesson page contents"


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