menu_navigation.feature 9.67 KB
Newer Older
1
@javascript @core @core_view @core_portfolio @menu
2
3
4
5
6
7
8
9
Feature: Checking the correct menu items are available for each user
In order to make sure the correct menu items are available
As every user
So users can access features in Mahara.

Background:
Given the following "institutions" exist:
     | name | displayname | registerallowed | registerconfirm |
10
     | instone | Institution One | ON | OFF |
11
12
13

Given the following "users" exist:
     | username | password | email | firstname | lastname | institution | authname | role |
14
15
16
17
     | UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
     | UserB | Kupuhipa1 | UserB@example.org  | Bob | Staff | mahara | internal |  staff  |
     | UserC | Kupuhipa1 | UserC@example.org | Cecilia | Staff | instone | internal | staff  |
     | AdminA | Kupuhipa1 | AdminA@example.org  | Angela | Admin | instone | internal | admin  |
18
19

Scenario: Checking menu items are available as a student (Bug 1467368)
20
 Given I log in as "UserA" with password "Kupuhipa1"
21
 # Checking the main menu navigation headings
22
 When I click on "Show main menu"
23
 And I wait "1" seconds
24
 And I follow "Dashboard"
25
26
 Then I should not see "Administration" in the "#main-nav-admin" "css_element"
 And I should not see "Site information" in the "#main-nav-admin" "css_element"
27
 And I click on "Show main menu"
28
29
30
31
32
 And I should see "Content" in the "#main-nav" "css_element"
 And I should see "Portfolio" in the "#main-nav" "css_element"
 And I should see "Groups" in the "#main-nav" "css_element"
 # Checking the sub navigation in Content
 When I follow "Content"
33
 And I click on "Show main menu"
34
35
36
37
38
39
40
 Then I should see "Profile" in the ".content" "css_element"
 And I should see "Profile pictures" in the ".content" "css_element"
 And I should see "Files" in the ".content" "css_element"
 And I should see "Journals" in the ".content" "css_element"
 And I should see "Résumé" in the ".content" "css_element"
 And I should see "Plans" in the ".content" "css_element"
 And I should see "Notes" in the ".content" "css_element"
41
42
# Checking the sub navigation in Portfolio
 When I follow "Portfolio"
43
 And I click on "Show main menu"
44
45
46
47
48
 Then I should see "Pages and collections" in the ".myportfolio" "css_element"
 And I should see "Shared by me" in the ".myportfolio" "css_element"
 And I should see "Shared with me" in the ".myportfolio" "css_element"
 And I should see "Export" in the ".myportfolio" "css_element"
 And I should see "Import" in the ".myportfolio" "css_element"
49
50
# Checking the sub navigation in Groups
 When I follow "Groups"
51
 And I click on "Show main menu"
52
53
54
 Then I should see "My groups" in the ".groups" "css_element"
 And I should see "Find groups" in the ".groups" "css_element"
 And I should see "My friends" in the ".groups" "css_element"
55
 And I should see "Find people" in the ".groups" "css_element"
56
57
 And I should see "Institution membership" in the ".groups" "css_element"
 And I should see "Topics" in the ".groups" "css_element"
58
59
60


Scenario: Checking menu items are available as site staff (Bug 1467368)
61
 Given I log in as "UserB" with password "Kupuhipa1"
62
63
 Then I should not see "Administration" in the "#main-nav" "css_element"
# The one major difference a site staff has is site info link that leads to other links
64
 And I click on "Show administration menu"
65
 And I wait "1" seconds
66
 And I follow "User search"
67
 And I click on "Show administration menu"
68
 Then I follow "Reports"
69
70
71
72
73


Scenario: Checking menu items are available as Admin User (Bug 1467368)
 Given I log in as "admin" with password "Kupuhipa1"
# checking the sub navigation in Administration
74
 And I click on "Show administration menu"
75
76
77
78
79
80
81
 Then I should see "Admin home" in the "#main-nav-admin" "css_element"
 And I should see "Configure site" in the "#main-nav-admin" "css_element"
 And I should see "Users" in the "#main-nav-admin" "css_element"
 And I should see "Groups" in the "#main-nav-admin" "css_element"
 And I should see "Institutions" in the "#main-nav-admin" "css_element"
 And I should see "Extensions" in the "#main-nav-admin" "css_element"
# Checking the sub navigation in Admin home
82
 When I press "Show menu for Admin home"
83
84
85
 Then I should see "Overview" in the ".adminhome" "css_element"
 And I should see "Register" in the ".adminhome" "css_element"
# Checking the sub navigation in Configure site
86
 When I press "Show menu for Configure site"
87
88
89
90
91
92
93
94
95
96
 Then I should see "Site options" in the ".configsite" "css_element"
 And I should see "Static pages" in the ".configsite" "css_element"
 And I should see "Menus" in the ".configsite" "css_element"
 And I should see "Networking" in the ".configsite" "css_element"
 And I should see "Licenses" in the ".configsite" "css_element"
 And I should see "Pages and collections" in the ".configsite" "css_element"
 And I should see "Share" in the ".configsite" "css_element"
 And I should see "Files" in the ".configsite" "css_element"
 And I should see "Cookie Consent" in the ".configsite" "css_element"
# Checking the sub navigation in Users
97
 When I press "Show menu for Users"
98
99
100
101
102
103
104
105
 Then I should see "User search" in the ".configusers" "css_element"
 And I should see "Suspended and expired users" in the ".configusers" "css_element"
 And I should see "Site staff" in the ".configusers" "css_element"
 And I should see "Site administrators" in the ".configusers" "css_element"
 And I should see "Export queue" in the ".configusers" "css_element"
 And I should see "Add user" in the ".configusers" "css_element"
 And I should see "Add users by CSV" in the ".configusers" "css_element"
# Checking the sub navigation in Groups
106
 When I press "Show menu for Groups" in the "li.managegroups" "css_element"
107
108
109
110
111
 Then I should see "Administer groups" in the ".managegroups" "css_element"
 And I should see "Group categories" in the ".managegroups" "css_element"
 And I should see "Archived submissions" in the ".managegroups" "css_element"
 And I should see "Add groups by CSV" in the ".managegroups" "css_element"
 And I should see "Update group members by CSV" in the ".managegroups" "css_element"
112
113
# Checking the sub administration in Institutions
 When I press "Show menu for Institutions"
114
 Then I should see "Settings" in the ".manageinstitutions" "css_element"
115
116
117
118
119
120
121
122
123
124
 And I should see "Static pages" in the ".manageinstitutions" "css_element"
 And I should see "Members" in the ".manageinstitutions" "css_element"
 And I should see "Staff" in the ".manageinstitutions" "css_element"
 And I should see "Administrators" in the ".manageinstitutions" "css_element"
 And I should see "Admin notifications" in the ".manageinstitutions" "css_element"
 And I should see "Profile completion" in the ".manageinstitutions" "css_element"
 And I should see "Pages and collections" in the ".manageinstitutions" "css_element"
 And I should see "Share" in the ".manageinstitutions" "css_element"
 And I should see "Files" in the ".manageinstitutions" "css_element"
 And I should see "Pending registrations" in the ".manageinstitutions" "css_element"
125
126
# Checking Reports menu
 And I should see "Reports"
127
# Checking the sub navigation in Extensions
128
 When I press "Show menu for Extensions"
129
130
131
132
 Then I should see "Plugin administration" in the ".configextensions" "css_element"
 And I should see "HTML filters" in the ".configextensions" "css_element"
 And I should see "Allowed iframe sources" in the ".configextensions" "css_element"
 And I should see "Clean URLs" in the ".configextensions" "css_element"
133
134
135


Scenario: Checking menu items are available as Institution Administrator (Bug 1467368)
136
 Given I log in as "AdminA" with password "Kupuhipa1"
137
# checking the sub navigation in Administration
138
 And I click on "Show administration menu"
139
140
 And I should not see "Configure site" in the "#main-nav-admin" "css_element"
 And I should not see "Extensions" in the "#main-nav-admin" "css_element"
141
# Checking the sub navigation in Users
142
 And I press "Show menu for Users"
143
144
145
146
147
148
149
150
 Then I should not see "Site staff" in the ".configusers" "css_element"
 And I should not see "Site administrators" in the ".configusers" "css_element"
 And I should see "User search" in the ".configusers" "css_element"
 And I should see "Suspended and expired users" in the ".configusers" "css_element"
 And I should see "Export queue" in the ".configusers" "css_element"
 And I should see "Add user" in the ".configusers" "css_element"
 And I should see "Add users by CSV" in the ".configusers" "css_element"
# Checking the sub navigation in Groups
151
 And I press "Show menu for Groups" in the "li.managegroups" "css_element"
152
153
154
155
156
157
 Then I should not see "Administer groups" in the ".managegroups ul" "css_element"
 And I should not see "Group categories" in the ".managegroups" "css_element"
 And I should see "Archived submissions" in the ".managegroups" "css_element"
 And I should see "Add groups by CSV" in the ".managegroups" "css_element"
 And I should see "Update group members by CSV" in the ".managegroups" "css_element"
# Checking the sub navigation in Institutions
158
 And I press "Show menu for Institutions"
159
 Then I should see "Profile completion" in the ".manageinstitutions" "css_element"
160
161
162
163
164
165
166
167
168
169
 And I should see "Settings" in the ".manageinstitutions" "css_element"
 And I should see "Static pages" in the ".manageinstitutions" "css_element"
 And I should see "Members" in the ".manageinstitutions" "css_element"
 And I should see "Staff" in the ".manageinstitutions" "css_element"
 And I should see "Administrators" in the ".manageinstitutions" "css_element"
 And I should see "Admin notifications" in the ".manageinstitutions" "css_element"
 And I should see "Pages and collections" in the ".manageinstitutions" "css_element"
 And I should see "Share" in the ".manageinstitutions" "css_element"
 And I should see "Files" in the ".manageinstitutions" "css_element"
 And I should see "Pending registrations" in the ".manageinstitutions" "css_element"
170
171
# Checking Reports menu
 And I should see "Reports"