Commit | Line | Data |
---|---|---|
112f1ab9 EL |
1 | @block @block_navigation |
2 | Feature: View my courses in navigation block | |
3 | In order to navigate to my courses | |
4 | As a student | |
5 | I need my courses displayed in the navigation block | |
6 | ||
7 | Background: | |
8 | Given the following "users" exists: | |
9 | | username | firstname | lastname | email | | |
10 | | student1 | Student | 1 | student1@asd.com | | |
11 | And the following "categories" exists: | |
12 | | name | category | idnumber | | |
13 | | cat1 | 0 | cat1 | | |
14 | | cat2 | 0 | cat2 | | |
15 | | cat3 | 0 | cat3 | | |
16 | | cat31 | cat3 | cat31 | | |
17 | | cat32 | cat3 | cat32 | | |
18 | | cat33 | cat3 | cat33 | | |
19 | And the following "courses" exists: | |
20 | | fullname | shortname | category | | |
21 | | Course1 | c1 | cat1 | | |
22 | | Course2 | c2 | cat2 | | |
23 | | Course31 | c31 | cat31 | | |
24 | | Course32 | c32 | cat32 | | |
25 | | Course331| c331 | cat33 | | |
26 | | Course332| c332 | cat33 | | |
27 | And the following "course enrolments" exists: | |
28 | | user | course | role | | |
29 | | student1 | c1 | student | | |
30 | | student1 | c31 | student | | |
31 | | student1 | c331 | student | | |
32 | And I log in as "admin" | |
33 | ||
34 | @javascript | |
35 | Scenario: The plain list of enrolled courses is shown | |
36 | Given I set the following administration settings values: | |
37 | | Show my course categories | 0 | | |
38 | And I log out | |
39 | And I log in as "student1" | |
40 | When I follow "My home" | |
41 | Then I should not see "cat1" in the "div.block_navigation .type_system" "css_element" | |
42 | And I should not see "cat2" in the "div.block_navigation .type_system" "css_element" | |
43 | And I should see "c1" in the "div.block_navigation .type_system" "css_element" | |
44 | And I should see "c31" in the "div.block_navigation .type_system" "css_element" | |
45 | And I should see "c331" in the "div.block_navigation .type_system" "css_element" | |
46 | And I should not see "c2" in the "div.block_navigation .type_system" "css_element" | |
47 | And I should not see "c32" in the "div.block_navigation .type_system" "css_element" | |
48 | And I should not see "c332" in the "div.block_navigation .type_system" "css_element" | |
49 | ||
50 | @javascript | |
51 | Scenario: The nested list of enrolled courses is shown | |
52 | Given I set the following administration settings values: | |
53 | | Show my course categories | 1 | | |
54 | And I log out | |
55 | And I log in as "student1" | |
56 | When I follow "My home" | |
57 | Then I should see "cat1" in the "div.block_navigation .type_system" "css_element" | |
58 | And I should see "cat3" in the "div.block_navigation .type_system" "css_element" | |
59 | And I should not see "cat2" in the "div.block_navigation .type_system" "css_element" | |
60 | When I expand "cat3" node | |
61 | Then I should see "cat31" in the "div.block_navigation .type_system" "css_element" | |
62 | And I should see "cat33" in the "div.block_navigation .type_system" "css_element" | |
63 | And I should not see "cat32" in the "div.block_navigation .type_system" "css_element" | |
64 | When I expand "cat31" node | |
65 | Then I should see "c31" in the "div.block_navigation .type_system" "css_element" | |
66 | When I expand "cat33" node | |
67 | And I should see "c331" in the "div.block_navigation .type_system" "css_element" | |
68 | And I should not see "c332" in the "div.block_navigation .type_system" "css_element" |