1 @block @block_navigation
2 Feature: Test collapse my courses navigation setting
4 I visit my My Moodle page and observe the the My Courses branch
7 Given the following "users" exist:
8 | username | firstname | lastname | email |
9 | student1 | Student | 1 | student1@asd.com |
10 And the following "categories" exist:
11 | name | category | idnumber |
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 |
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 follow "My home"
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"
30 Scenario: The My Courses branch is collapsed when collapse my courses is on
31 Given I log in as "admin"
32 And I set the following administration settings values:
33 | Keep My Courses collapsed initially | 1 |
35 Given I log in as "student1"
36 And I follow "My home"
37 Then I should not see "c1" in the "Navigation" "block"
38 And I should not see "c2" in the "Navigation" "block"
39 And I should not see "c3" in the "Navigation" "block"
42 Scenario: My Courses can be expanded on the My Moodle page when collapse my courses is on
43 Given I log in as "admin"
44 And I set the following administration settings values:
45 | Keep My Courses collapsed initially | 1 |
47 Given I log in as "student1"
48 And I follow "My home"
49 And I should not see "c1" in the "Navigation" "block"
50 And I should not see "c2" in the "Navigation" "block"
51 And I should not see "c3" in the "Navigation" "block"
52 And I expand "My courses" node
53 Then I should see "c1" in the "Navigation" "block"
54 And I should see "c2" in the "Navigation" "block"
55 And I should not see "c3" in the "Navigation" "block"