[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/behat/ -> max_number_sections.feature (source)

   1  @core @core_course
   2  Feature: The maximum number of weeks/topics in a course can be configured
   3    In order to set boundaries to courses size
   4    As a manager
   5    I need to limit the number of weeks/topics a course can have
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | manager1 | Manager | 1 | manager1@example.com |
  11      And the following "system role assigns" exist:
  12        | user | course | role |
  13        | manager1 | Acceptance test site | manager |
  14      And I log in as "admin"
  15      And I navigate to "Course default settings" node in "Site administration >  Courses"
  16  
  17    @javascript
  18    Scenario: The number of sections can be increased and the limits are applied to courses
  19      Given I set the field "Maximum number of sections" to "100"
  20      When I press "Save changes"
  21      Then the field "Maximum number of sections" matches value "100"
  22      And the "Number of sections" select box should contain "100"
  23      And I log out
  24      And I log in as "manager1"
  25      And I create a course with:
  26        | Course full name | New course fullname |
  27        | Course short name | New course shortname |
  28        | Number of sections | 90 |
  29        | Format | Topics format |
  30      And I follow "New course fullname"
  31      And I should see "Topic 90"
  32  
  33    @javascript
  34    Scenario: The number of sections can be reduced to 0 and the limits are applied to courses
  35      Given I set the field "Maximum number of sections" to "0"
  36      When I press "Save changes"
  37      Then the field "Maximum number of sections" matches value "0"
  38      And the "Number of sections" select box should contain "0"
  39      And the "Number of sections" select box should not contain "52"
  40      And I log out
  41      And I log in as "manager1"
  42      And I create a course with:
  43        | Course full name | New course fullname |
  44        | Course short name | New course shortname |
  45        | Number of sections | 0 |
  46        | Format | Topics format |
  47      And I follow "New course fullname"
  48      And I should not see "Topic 1"


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