feat: update Dockerfiles to use explicit image paths and enhance localStorage handling in ThemeService
This commit is contained in:
1 parent
030d00ef67
commit
3dca10b56f
7 files changed
+59
-10
No files matched your search
@@ -58,7 +58,13 @@ test('persists a dark appearance preference from Settings', async ({ page }) =>
|
||||
await page.getByRole('radio', { name: 'Sombre' }).check();
|
||||
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
||||
expect(await page.evaluate(() => localStorage.getItem('lmnp-theme'))).toBe('dark');
|
||||
expect(
|
||||
await page.evaluate(
|
||||
// This callback runs in the browser page, where localStorage is guaranteed by the test.
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
() => localStorage.getItem('lmnp-theme'),
|
||||
),
|
||||
).toBe('dark');
|
||||
|
||||
await page.reload();
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
||||
@@ -192,7 +198,11 @@ test('keeps the secured API check and logout available', async ({ page }) => {
|
||||
});
|
||||
|
||||
test('follows operating-system changes for the System theme', async ({ page }) => {
|
||||
await page.addInitScript(() => localStorage.setItem('lmnp-theme', 'system'));
|
||||
await page.addInitScript(
|
||||
// This callback runs in the browser page, where localStorage is guaranteed by the test.
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
() => localStorage.setItem('lmnp-theme', 'system'),
|
||||
);
|
||||
await page.emulateMedia({ colorScheme: 'dark' });
|
||||
await mockUser(page, true);
|
||||
await mockEmptyApartmentList(page);
|
||||
|
||||
Reference in new issue
Block a user