[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @mod @mod_lesson
   2  Feature: A teacher can set available from and deadline dates to access a lesson
   3    In order to schedule lesson activities
   4    As a teacher
   5    I need to set available from and deadline dates
   6  
   7    Background:
   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  
  23    Scenario: Forbidding lesson accesses until a specified date
  24      Given I add a "Lesson" to section "1"
  25      And I expand all fieldsets
  26      And I set the field "id_available_enabled" to "1"
  27      And I set the following fields to these values:
  28        | Name | Test lesson |
  29        | Description | Test lesson description |
  30        | available[day] | 1 |
  31        | available[month] | January |
  32        | available[year] | 2020 |
  33        | available[hour] | 08 |
  34        | available[minute] | 00 |
  35      And I press "Save and display"
  36      And I follow "Test lesson"
  37      And I follow "Add a content page"
  38      And I set the following fields to these values:
  39        | Page title | First page name |
  40        | Page contents | First page contents |
  41        | Description | The first one |
  42      And I press "Save page"
  43      And I log out
  44      And I log in as "student1"
  45      And I follow "Course 1"
  46      When I follow "Test lesson"
  47      Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00"
  48      And I should not see "First page contents"
  49  
  50    Scenario: Forbidding lesson accesses until a specified date
  51      Given I add a "Lesson" to section "1"
  52      And I set the field "id_deadline_enabled" to "1"
  53      And I set the following fields to these values:
  54        | Name | Test lesson |
  55        | Description | Test lesson description |
  56        | deadline[day] | 1 |
  57        | deadline[month] | January |
  58        | deadline[year] | 2000 |
  59        | deadline[hour] | 08 |
  60        | deadline[minute] | 00 |
  61      And I press "Save and display"
  62      And I follow "Test lesson"
  63      And I follow "Add a content page"
  64      And I set the following fields to these values:
  65        | Page title | First page name |
  66        | Page contents | First page contents |
  67        | Description | The first one |
  68      And I press "Save page"
  69      And I log out
  70      And I log in as "student1"
  71      And I follow "Course 1"
  72      When I follow "Test lesson"
  73      Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00"
  74      And I should not see "First page contents"


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