Update homepage routes to include language and mode
Build & Deploy / Build & Push Docker Image (push) Successful in 2m51s
Test / Type Check (all packages) (push) Successful in 52s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 44s
Test / Storefront Unit Tests (push) Successful in 39s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 40s
Test / API Integration Tests (push) Successful in 1m0s
Build & Deploy / Build & Push Docker Image (push) Successful in 2m51s
Test / Type Check (all packages) (push) Successful in 52s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 44s
Test / Storefront Unit Tests (push) Successful in 39s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 40s
Test / API Integration Tests (push) Successful in 1m0s
This commit is contained in:
@@ -14,7 +14,7 @@ test('explicit dark theme is present on the server-rendered root', async ({ brow
|
||||
},
|
||||
]);
|
||||
const page = await context.newPage();
|
||||
const response = await page.goto('/en');
|
||||
const response = await page.goto('/en/dark');
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme-preference', 'dark');
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
||||
const csp = response?.headers()['content-security-policy'] ?? '';
|
||||
@@ -28,7 +28,7 @@ test('explicit dark theme is present on the server-rendered root', async ({ brow
|
||||
test('system preference resolves before interaction', async ({ browser }) => {
|
||||
const context = await browser.newContext({ colorScheme: 'dark' });
|
||||
const page = await context.newPage();
|
||||
await page.goto('/en');
|
||||
await page.goto('/en/system');
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme-preference', 'system');
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
||||
await context.close();
|
||||
@@ -37,7 +37,7 @@ test('system preference resolves before interaction', async ({ browser }) => {
|
||||
test('system follows operating-system changes while explicit preferences ignore them', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/en');
|
||||
await page.goto('/en/system');
|
||||
const selector = page.getByLabel('Theme').first();
|
||||
|
||||
await selector.selectOption('system');
|
||||
@@ -47,6 +47,7 @@ test('system follows operating-system changes while explicit preferences ignore
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'light');
|
||||
|
||||
await selector.selectOption('dark');
|
||||
await expect(page).toHaveURL('/en/dark');
|
||||
await page.emulateMedia({ colorScheme: 'light' });
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme-preference', 'dark');
|
||||
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
||||
|
||||
Reference in New Issue
Block a user