AI-native design editor. Open-source Figma alternative.
test(ui): keep runtime theme import dependency-safe
Danila Poyarkov721b7b21916e
diff --git a/tests/e2e/ui/theme.spec.ts b/tests/e2e/ui/theme.spec.tsindex 6a63e1523..903d83213 100644--- a/tests/e2e/ui/theme.spec.ts+++ b/tests/e2e/ui/theme.spec.ts@@ -23,7 +23,8 @@ test('rulers follow the active theme', async () => {// Switch to light via the app's theme API (module state, not raw localStorage,// so the watcher applies it and pushes the ruler theme to the active editor).await page.evaluate(async () => {- const themeModule = await import('/src/app/shell/theme.ts')+ const themeModulePath = '/src/app/shell/theme.ts'+ const themeModule = await import(themeModulePath)themeModule.useAppTheme().setTheme('light')})await page.waitForFunction(() => document.documentElement.dataset.theme === 'light')@@ -36,7 +37,8 @@ test('rulers follow the active theme', async () => {// Restore dark so later specs are unaffected.await page.evaluate(async () => {- const themeModule = await import('/src/app/shell/theme.ts')+ const themeModulePath = '/src/app/shell/theme.ts'+ const themeModule = await import(themeModulePath)themeModule.useAppTheme().setTheme('dark')})await page.waitForFunction(() => document.documentElement.dataset.theme === 'dark')