mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-15 12:41:37 +03:00
test(app): scope theme list locators to the listbox
This commit is contained in:
@@ -100,8 +100,9 @@ test("arrow keys wrap around the theme list", async ({ page }) => {
|
||||
const { settings } = await open(page)
|
||||
await settings.getByRole("tab", { name: "Appearance", exact: true }).click()
|
||||
await settings.locator('[data-action="settings-theme"]').click()
|
||||
const options = page.getByRole("listbox").getByRole("option")
|
||||
await expect(page.getByRole("option", { name: "OpenCode", selected: true })).toBeFocused()
|
||||
const listbox = page.getByRole("listbox")
|
||||
const options = listbox.getByRole("option")
|
||||
await expect(listbox.getByRole("option", { name: "OpenCode", selected: true })).toBeFocused()
|
||||
|
||||
await page.keyboard.press("End")
|
||||
await expect(options.last()).toBeFocused()
|
||||
|
||||
Reference in New Issue
Block a user