summaryrefslogtreecommitdiffhomepage
path: root/packages/app/e2e/settings
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-03-08 19:28:58 -0500
committerGitHub <[email protected]>2026-03-08 19:28:58 -0500
commitb976f339e857be3fae20f179992aa82fbea24f08 (patch)
tree14655402aef6b5ba8e0c0c5c13797a3984319e6c /packages/app/e2e/settings
parent7d7837e5b6eb0fc88d202936b726ab890f4add53 (diff)
downloadopencode-b976f339e857be3fae20f179992aa82fbea24f08.tar.gz
opencode-b976f339e857be3fae20f179992aa82fbea24f08.zip
feat(app): generate color palettes (#16232)
Diffstat (limited to 'packages/app/e2e/settings')
-rw-r--r--packages/app/e2e/settings/settings.spec.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/app/e2e/settings/settings.spec.ts b/packages/app/e2e/settings/settings.spec.ts
index c2a8522eb..42fe0b06c 100644
--- a/packages/app/e2e/settings/settings.spec.ts
+++ b/packages/app/e2e/settings/settings.spec.ts
@@ -83,16 +83,23 @@ test("changing theme persists in localStorage", async ({ page, gotoSession }) =>
const select = dialog.locator(settingsThemeSelector)
await expect(select).toBeVisible()
+ const currentThemeId = await page.evaluate(() => {
+ return document.documentElement.getAttribute("data-theme")
+ })
+ const currentTheme = (await select.locator('[data-slot="select-select-trigger-value"]').textContent())?.trim() ?? ""
+
await select.locator('[data-slot="select-select-trigger"]').click()
const items = page.locator('[data-slot="select-select-item"]')
const count = await items.count()
expect(count).toBeGreaterThan(1)
- const firstTheme = await items.nth(1).locator('[data-slot="select-select-item-label"]').textContent()
- expect(firstTheme).toBeTruthy()
+ const nextTheme = (await items.locator('[data-slot="select-select-item-label"]').allTextContents())
+ .map((x) => x.trim())
+ .find((x) => x && x !== currentTheme)
+ expect(nextTheme).toBeTruthy()
- await items.nth(1).click()
+ await items.filter({ hasText: nextTheme! }).first().click()
await page.keyboard.press("Escape")
@@ -101,7 +108,7 @@ test("changing theme persists in localStorage", async ({ page, gotoSession }) =>
})
expect(storedThemeId).not.toBeNull()
- expect(storedThemeId).not.toBe("oc-1")
+ expect(storedThemeId).not.toBe(currentThemeId)
const dataTheme = await page.evaluate(() => {
return document.documentElement.getAttribute("data-theme")