test(app): scope theme list locators to the listbox

This commit is contained in:
vaprdev
2026-11-05 15:26:35 +00:00
Unverified
parent 1ea7467e5f
commit 9241ecfa96
+3 -2
View File
@@ -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()