aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/theming_features/theming.feature
blob: 2ae5d4f75c377893d3bf333273ba6f095be438d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: theming

	Background:
		Given user "user0" exists

	Scenario: themed stylesheets are available for users
		Given As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css"
		Then the HTTP status code should be "200"

	Scenario: themed stylesheets are available for guests
		Given As an "anonymous"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css"
		Then the HTTP status code should be "200"
		# Themes that can not be explicitly set by a guest could have been
		# globally set too through "enforce_theme".
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css"
		Then the HTTP status code should be "200"

	Scenario: themed stylesheets are available for disabled users
		Given As an "admin"
		And assure user "user0" is disabled
		And As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css"
		Then the HTTP status code should be "200"

	Scenario: themed images are available for users
		Given Logging in using web as "admin"
		And logged in admin uploads theming image for "background" from file "data/clouds.jpg"
		And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png"
		And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png"
		And As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/image/background"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logo"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader"
		Then the HTTP status code should be "200"

	Scenario: themed images are available for guests
		Given Logging in using web as "admin"
		And logged in admin uploads theming image for "background" from file "data/clouds.jpg"
		And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png"
		And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png"
		And As an "anonymous"
		When sending "GET" with exact url to "/index.php/apps/theming/image/background"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logo"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader"
		Then the HTTP status code should be "200"

	Scenario: themed images are available for disabled users
		Given Logging in using web as "admin"
		And logged in admin uploads theming image for "background" from file "data/clouds.jpg"
		And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png"
		And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png"
		And As an "admin"
		And assure user "user0" is disabled
		And As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/image/background"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logo"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader"
		Then the HTTP status code should be "200"

	Scenario: themed icons are available for users
		Given As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard"
		Then the HTTP status code should be "200"

	Scenario: themed icons are available for guests
		Given As an "anonymous"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard"
		Then the HTTP status code should be "200"

	Scenario: themed icons are available for disabled users
		Given As an "admin"
		And assure user "user0" is disabled
		And As an "user0"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard"
		Then the HTTP status code should be "200"
		When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard"
		Then the HTTP status code should be "200"