[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @core @core_course @_cross_browser
   2  Feature: Show/hide course sections
   3    In order to delay sections availability
   4    As a teacher
   5    I need to show or hide sections
   6  
   7    @javascript
   8    Scenario: Show / hide section icon functions correctly
   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 | format |
  15        | Course 1 | C1 | topics |
  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 "Forum" to section "1" and I fill the form with:
  24        | Forum name | Test hidden forum 11 name |
  25        | Description | Test hidden forum 11 description |
  26        | Visible | Hide |
  27      And I add a "Forum" to section "1" and I fill the form with:
  28        | Forum name | Test hidden forum 12 name |
  29        | Description | Test hidden forum 12 description |
  30        | Visible | Show |
  31      And I add a "Forum" to section "2" and I fill the form with:
  32        | Forum name | Test hidden forum 21 name |
  33        | Description | Test hidden forum 21 description |
  34        | Visible | Hide |
  35      And I add a "Forum" to section "2" and I fill the form with:
  36        | Forum name | Test hidden forum 22 name |
  37        | Description | Test hidden forum 22 description |
  38        | Visible | Show |
  39      And I add a "Forum" to section "3" and I fill the form with:
  40        | Forum name | Test hidden forum 31 name |
  41        | Description | Test hidden forum 31 description |
  42        | Visible | Hide |
  43      And I add a "Forum" to section "3" and I fill the form with:
  44        | Forum name | Test hidden forum 32 name |
  45        | Description | Test hidden forum 32 description |
  46        | Visible | Show |
  47      And I follow "Course 1"
  48      When I hide section "1"
  49      Then section "1" should be hidden
  50      And section "2" should be visible
  51      And section "3" should be visible
  52      And I hide section "2"
  53      And section "2" should be hidden
  54      And I show section "2"
  55      And section "2" should be visible
  56      And I hide section "3"
  57      And I show section "3"
  58      And I hide section "3"
  59      And section "3" should be hidden
  60      And I reload the page
  61      And section "1" should be hidden
  62      And all activities in section "1" should be hidden
  63      And section "2" should be visible
  64      And section "3" should be hidden
  65      And all activities in section "1" should be hidden
  66      And I log out
  67      And I log in as "student1"
  68      And I follow "Course 1"
  69      And section "1" should be hidden
  70      And all activities in section "1" should be hidden
  71      And section "2" should be visible
  72      And section "3" should be hidden
  73      And all activities in section "1" should be hidden


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