From daf4dbea14de4770e6623629c178b4515ffeb917 Mon Sep 17 00:00:00 2001 From: Sienna Meridian Satterwhite Date: Wed, 18 Mar 2026 18:35:23 +0000 Subject: [PATCH] test(front): add e2e test for theme CSS token integration Verify that Cunningham contextual tokens resolve at runtime and that the scheduler toolbar no longer uses hardcoded white background, confirming the theme CSS chain works end-to-end. --- .../apps/e2e/__tests__/calendar.test.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) 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)') + } + }) + }) })