diff --git a/src/frontend/apps/e2e/__tests__/calendar.test.ts b/src/frontend/apps/e2e/__tests__/calendar.test.ts index ade7c28..000032d 100644 --- a/src/frontend/apps/e2e/__tests__/calendar.test.ts +++ b/src/frontend/apps/e2e/__tests__/calendar.test.ts @@ -230,4 +230,29 @@ test.describe('Calendar Application', () => { await expect(focusedElement).toBeDefined() }) }) + + test.describe('Theme Integration', () => { + test('calendar uses contextual CSS tokens, not hardcoded colors', async ({ page }) => { + await page.goto('/') + await page.waitForSelector('.ec', { timeout: 10000 }) + + // Verify a contextual token resolves to a non-empty value + const surfaceBg = await page.evaluate(() => + getComputedStyle(document.documentElement) + .getPropertyValue('--c--contextuals--background--surface--primary') + .trim() + ) + expect(surfaceBg).toBeTruthy() + + // Verify the scheduler toolbar uses the token, not hardcoded white + const toolbarBg = await page.evaluate(() => { + const el = document.querySelector('.scheduler-toolbar') + return el ? getComputedStyle(el).backgroundColor : null + }) + // Should NOT be white (#ffffff = rgb(255, 255, 255)) + if (toolbarBg) { + expect(toolbarBg).not.toBe('rgb(255, 255, 255)') + } + }) + }) })