|
3 | 3 | from parameterized import parameterized |
4 | 4 |
|
5 | 5 | from tests.test_utils import mock_request_handler |
6 | | -from web.web_auth_utils import remove_webpack_suffixes, is_allowed_during_login |
7 | | - |
8 | | - |
9 | | -class WebpackSuffixesTest(TestCase): |
10 | | - def test_remove_webpack_suffixes_when_css(self): |
11 | | - normalized = remove_webpack_suffixes('js/chunk-login-vendors.59040343.css') |
12 | | - self.assertEqual('js/chunk-login-vendors.css', normalized) |
13 | | - |
14 | | - def test_remove_webpack_suffixes_when_js(self): |
15 | | - normalized = remove_webpack_suffixes('js/login.be16f278.js') |
16 | | - self.assertEqual('js/login.js', normalized) |
17 | | - |
18 | | - def test_remove_webpack_suffixes_when_js_map(self): |
19 | | - normalized = remove_webpack_suffixes('js/login.be16f278.js.map') |
20 | | - self.assertEqual('js/login.js.map', normalized) |
21 | | - |
22 | | - def test_remove_webpack_suffixes_when_favicon(self): |
23 | | - normalized = remove_webpack_suffixes('favicon.123.ico') |
24 | | - self.assertEqual('favicon.123.ico', normalized) |
25 | | - |
26 | | - def test_remove_webpack_suffixes_when_no_suffixes(self): |
27 | | - normalized = remove_webpack_suffixes('css/chunk-login-vendors.css') |
28 | | - self.assertEqual('css/chunk-login-vendors.css', normalized) |
29 | | - |
30 | | - def test_remove_webpack_suffixes_when_no_extension(self): |
31 | | - normalized = remove_webpack_suffixes('data/some_file') |
32 | | - self.assertEqual('data/some_file', normalized) |
| 6 | +from web.web_auth_utils import is_allowed_during_login |
33 | 7 |
|
34 | 8 |
|
35 | 9 | class LoginResourcesTest(TestCase): |
36 | 10 | @parameterized.expand([ |
37 | 11 | ('/favicon.ico'), |
38 | 12 | ('login.html'), |
39 | | - ('/js/login.be16f278.js'), |
40 | | - ('/js/login.be16f278.js.map'), |
41 | | - ('/js/chunk-login-vendors.18e22e7f.js'), |
42 | | - ('/js/chunk-login-vendors.18e22e7f.js.map'), |
43 | | - ('/img/titleBackground_login.a6c36d4c.jpg'), |
44 | | - ('/css/login.8e74be0f.css'), |
45 | | - ('/fonts/roboto-latin-400.60fa3c06.woff'), |
46 | | - ('/fonts/roboto-latin-400.479970ff.woff2'), |
47 | | - ('/fonts/roboto-latin-500.020c97dc.woff2'), |
48 | | - ('/fonts/roboto-latin-500.87284894.woff'), |
49 | 13 | # Vite-built hashed bundles served from /assets/ (used by the login page) |
50 | 14 | ('/assets/login-jEjOHyEw.js'), |
51 | 15 | ('/assets/css-Bn4Yn0er.css'), |
52 | 16 | ('/assets/theme-C3Leg-oT.css'), |
53 | | - ('/assets/MaterialIcons-Regular-Bnsxcfr1.woff') |
| 17 | + ('/assets/MaterialIcons-Regular-Bnsxcfr1.woff'), |
| 18 | + # Custom theme assets (conf/theme/...) |
| 19 | + ('/theme/theme.css'), |
| 20 | + ('/theme/logo.png') |
54 | 21 | ]) |
55 | 22 | def test_is_allowed_during_login_when_allowed(self, resource): |
56 | 23 | request_handler = mock_request_handler(method='GET') |
|
0 commit comments