[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/navigation/tests/behat/ -> expand_my_courses_setting.feature (source)

   1  @block @block_navigation
   2  Feature: Test expand my courses navigation setting
   3    As a student
   4    I visit my My Moodle page and observe the the My Courses branch
   5  
   6    Background:
   7      Given the following "users" exist:
   8        | username | firstname | lastname | email |
   9        | student1 | Student | 1 | student1@example.com |
  10      And the following "categories" exist:
  11        | name  | category | idnumber |
  12        | cat1  | 0        | cat1     |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course1  | c1        | cat1     |
  16        | Course2  | c2        | cat1     |
  17        | Course3  | c3        | cat1     |
  18      And the following "course enrolments" exist:
  19        | user     | course | role    |
  20        | student1 | c1     | student |
  21        | student1 | c2    | student |
  22  
  23    Scenario: The My Courses branch is expanded on the My Moodle page by default
  24      When I log in as "student1"
  25      And I click on "Dashboard" "link" in the "Navigation" "block"
  26      Then I should see "c1" in the "Navigation" "block"
  27      And I should see "c2" in the "Navigation" "block"
  28      And I should not see "c3" in the "Navigation" "block"
  29  
  30    @javascript
  31    Scenario: The My Courses branch is collapsed when expand my courses is off
  32      Given I log in as "admin"
  33      And I set the following administration settings values:
  34        | Show My courses expanded on Dashboard | 0 |
  35      And I log out
  36      When I log in as "student1"
  37      And I click on "Dashboard" "link" in the "Navigation" "block"
  38      Then I should not see "c1" in the "Navigation" "block"
  39      And I should not see "c2" in the "Navigation" "block"
  40      And I should not see "c3" in the "Navigation" "block"
  41  
  42    @javascript
  43    Scenario: My Courses can be expanded on the My Moodle page when expand my courses is off
  44      Given I log in as "admin"
  45      And I set the following administration settings values:
  46        | Show My courses expanded on Dashboard | 0 |
  47      And I log out
  48      When I log in as "student1"
  49      And I click on "Dashboard" "link" in the "Navigation" "block"
  50      And I should not see "c1" in the "Navigation" "block"
  51      And I should not see "c2" in the "Navigation" "block"
  52      And I should not see "c3" in the "Navigation" "block"
  53      And I expand "My courses" node
  54      Then I should see "c1" in the "Navigation" "block"
  55      And I should see "c2" in the "Navigation" "block"
  56      And I should not see "c3" in the "Navigation" "block"


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