[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @core @core_course @_cross_browser
   2  Feature: Toggle activities visibility from the course page
   3    In order to delay activities availability
   4    As a teacher
   5    I need to quickly change the visibility of an activity
   6  
   7    @javascript
   8    Scenario: Hide/Show toggle with javascript enabled
   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 forum name |
  25        | Description | Test forum description |
  26        | Visible | Show |
  27      When I open "Test forum name" actions menu
  28      And I click on "Hide" "link" in the "Test forum name" activity
  29      Then "Test forum name" activity should be hidden
  30      And I open "Test forum name" actions menu
  31      And I click on "Show" "link" in the "Test forum name" activity
  32      And "Test forum name" activity should be visible
  33      And I open "Test forum name" actions menu
  34      And I click on "Hide" "link" in the "Test forum name" activity
  35      And "Test forum name" activity should be hidden
  36      And I reload the page
  37      And "Test forum name" activity should be hidden
  38      And I log out
  39      And I log in as "student1"
  40      And I follow "Course 1"
  41      And "Test forum name" activity should be hidden
  42  
  43    @javascript
  44    Scenario: Activities can be shown and hidden inside a hidden section
  45      Given the following "users" exist:
  46        | username | firstname | lastname | email |
  47        | teacher1 | Teacher | 1 | teacher1@example.com |
  48      And the following "courses" exist:
  49        | fullname | shortname | format | numsections |
  50        | Course 1 | C1 | topics | 2 |
  51      And the following "course enrolments" exist:
  52        | user | course | role |
  53        | teacher1 | C1 | editingteacher |
  54      And I log in as "teacher1"
  55      And I follow "Course 1"
  56      And I turn editing mode on
  57      And I add a "Forum" to section "2" and I fill the form with:
  58        | Forum name | Test forum name |
  59        | Description | Test forum description |
  60        | Visible | Show |
  61      When I hide section "2"
  62      Then "Test forum name" activity should be hidden
  63      And I open "Test forum name" actions menu
  64      And I click on "Show" "link" in the "Test forum name" activity
  65      And "Test forum name" activity should be visible
  66      And I open "Test forum name" actions menu
  67      And I click on "Hide" "link" in the "Test forum name" activity
  68      And "Test forum name" activity should be hidden
  69  
  70    @javascript
  71    Scenario: Activities can be shown and hidden inside an orphaned section
  72      Given the following "users" exist:
  73        | username | firstname | lastname | email |
  74        | teacher1 | Teacher | 1 | teacher1@example.com |
  75      And the following "courses" exist:
  76        | fullname | shortname | format | numsections |
  77        | Course 1 | C1 | topics | 2 |
  78      And the following "course enrolments" exist:
  79        | user | course | role |
  80        | teacher1 | C1 | editingteacher |
  81      And I log in as "teacher1"
  82      And I follow "Course 1"
  83      And I turn editing mode on
  84      And I add a "Forum" to section "2" and I fill the form with:
  85        | Forum name | Test forum name |
  86        | Description | Test forum description |
  87        | Visible | Show |
  88      When I click on ".reduce-sections" "css_element"
  89      Then "Test forum name" activity should be visible
  90      And I open "Test forum name" actions menu
  91      And I click on "Hide" "link" in the "Test forum name" activity
  92      And "Test forum name" activity should be hidden
  93      And I open "Test forum name" actions menu
  94      And I click on "Show" "link" in the "Test forum name" activity
  95      And "Test forum name" activity should be visible


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