test(front): add e2e test for theme CSS token integration
Some checks failed
Frontend Workflow / install-front (push) Has been cancelled
Main Workflow / lint-back (push) Has been cancelled
Main Workflow / test-back (push) Has been cancelled
Docker Hub Workflow / build-and-push-backend (push) Has been cancelled
Docker Hub Workflow / build-and-push-frontend (push) Has been cancelled
Frontend Workflow / lint-front (push) Has been cancelled
Frontend Workflow / test-unit (push) Has been cancelled

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.
This commit is contained in:
2026-03-18 18:35:23 +00:00
parent 03126ea5bf
commit daf4dbea14

View File

@@ -230,4 +230,29 @@ test.describe('Calendar Application', () => {
await expect(focusedElement).toBeDefined() 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)')
}
})
})
}) })