|
| 1 | +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
| 2 | +# SPDX-License-Identifier: AGPL-3.0-or-later |
| 3 | +Feature: theming |
| 4 | + |
| 5 | + Background: |
| 6 | + Given user "user0" exists |
| 7 | + |
| 8 | + Scenario: themed stylesheets are available for users |
| 9 | + Given As an "user0" |
| 10 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css" |
| 11 | + Then the HTTP status code should be "200" |
| 12 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css" |
| 13 | + Then the HTTP status code should be "200" |
| 14 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css" |
| 15 | + Then the HTTP status code should be "200" |
| 16 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css" |
| 17 | + Then the HTTP status code should be "200" |
| 18 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css" |
| 19 | + Then the HTTP status code should be "200" |
| 20 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css" |
| 21 | + Then the HTTP status code should be "200" |
| 22 | + |
| 23 | + Scenario: themed stylesheets are available for guests |
| 24 | + Given As an "anonymous" |
| 25 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css" |
| 26 | + Then the HTTP status code should be "200" |
| 27 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css" |
| 28 | + Then the HTTP status code should be "200" |
| 29 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css" |
| 30 | + Then the HTTP status code should be "200" |
| 31 | + # Themes that can not be explicitly set by a guest could have been |
| 32 | + # globally set too through "enforce_theme". |
| 33 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css" |
| 34 | + Then the HTTP status code should be "200" |
| 35 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css" |
| 36 | + Then the HTTP status code should be "200" |
| 37 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css" |
| 38 | + Then the HTTP status code should be "200" |
| 39 | + |
| 40 | + Scenario: themed stylesheets are available for disabled users |
| 41 | + Given As an "admin" |
| 42 | + And assure user "user0" is disabled |
| 43 | + And As an "user0" |
| 44 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/default.css" |
| 45 | + Then the HTTP status code should be "200" |
| 46 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light.css" |
| 47 | + Then the HTTP status code should be "200" |
| 48 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark.css" |
| 49 | + Then the HTTP status code should be "200" |
| 50 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/light-highcontrast.css" |
| 51 | + Then the HTTP status code should be "200" |
| 52 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/dark-highcontrast.css" |
| 53 | + Then the HTTP status code should be "200" |
| 54 | + When sending "GET" with exact url to "/index.php/apps/theming/theme/opendyslexic.css" |
| 55 | + Then the HTTP status code should be "200" |
| 56 | + |
| 57 | + Scenario: themed images are available for users |
| 58 | + Given Logging in using web as "admin" |
| 59 | + And logged in admin uploads theming image for "background" from file "data/clouds.jpg" |
| 60 | + And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png" |
| 61 | + And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png" |
| 62 | + And As an "user0" |
| 63 | + When sending "GET" with exact url to "/index.php/apps/theming/image/background" |
| 64 | + Then the HTTP status code should be "200" |
| 65 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logo" |
| 66 | + Then the HTTP status code should be "200" |
| 67 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader" |
| 68 | + Then the HTTP status code should be "200" |
| 69 | + |
| 70 | + Scenario: themed images are available for guests |
| 71 | + Given Logging in using web as "admin" |
| 72 | + And logged in admin uploads theming image for "background" from file "data/clouds.jpg" |
| 73 | + And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png" |
| 74 | + And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png" |
| 75 | + And As an "anonymous" |
| 76 | + When sending "GET" with exact url to "/index.php/apps/theming/image/background" |
| 77 | + Then the HTTP status code should be "200" |
| 78 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logo" |
| 79 | + Then the HTTP status code should be "200" |
| 80 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader" |
| 81 | + Then the HTTP status code should be "200" |
| 82 | + |
| 83 | + Scenario: themed images are available for disabled users |
| 84 | + Given Logging in using web as "admin" |
| 85 | + And logged in admin uploads theming image for "background" from file "data/clouds.jpg" |
| 86 | + And logged in admin uploads theming image for "logo" from file "data/coloured-pattern-non-square.png" |
| 87 | + And logged in admin uploads theming image for "logoheader" from file "data/coloured-pattern-non-square.png" |
| 88 | + And As an "admin" |
| 89 | + And assure user "user0" is disabled |
| 90 | + And As an "user0" |
| 91 | + When sending "GET" with exact url to "/index.php/apps/theming/image/background" |
| 92 | + Then the HTTP status code should be "200" |
| 93 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logo" |
| 94 | + Then the HTTP status code should be "200" |
| 95 | + When sending "GET" with exact url to "/index.php/apps/theming/image/logoheader" |
| 96 | + Then the HTTP status code should be "200" |
| 97 | + |
| 98 | + Scenario: themed icons are available for users |
| 99 | + Given As an "user0" |
| 100 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon" |
| 101 | + Then the HTTP status code should be "200" |
| 102 | + When sending "GET" with exact url to "/index.php/apps/theming/icon" |
| 103 | + Then the HTTP status code should be "200" |
| 104 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard" |
| 105 | + Then the HTTP status code should be "200" |
| 106 | + When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard" |
| 107 | + Then the HTTP status code should be "200" |
| 108 | + |
| 109 | + Scenario: themed icons are available for guests |
| 110 | + Given As an "anonymous" |
| 111 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon" |
| 112 | + Then the HTTP status code should be "200" |
| 113 | + When sending "GET" with exact url to "/index.php/apps/theming/icon" |
| 114 | + Then the HTTP status code should be "200" |
| 115 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard" |
| 116 | + Then the HTTP status code should be "200" |
| 117 | + When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard" |
| 118 | + Then the HTTP status code should be "200" |
| 119 | + |
| 120 | + Scenario: themed icons are available for disabled users |
| 121 | + Given As an "admin" |
| 122 | + And assure user "user0" is disabled |
| 123 | + And As an "user0" |
| 124 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon" |
| 125 | + Then the HTTP status code should be "200" |
| 126 | + When sending "GET" with exact url to "/index.php/apps/theming/icon" |
| 127 | + Then the HTTP status code should be "200" |
| 128 | + When sending "GET" with exact url to "/index.php/apps/theming/favicon/dashboard" |
| 129 | + Then the HTTP status code should be "200" |
| 130 | + When sending "GET" with exact url to "/index.php/apps/theming/icon/dashboard" |
| 131 | + Then the HTTP status code should be "200" |
0 commit comments