fix: test e2e click “Show Code Actions” button then wait for listbox on macOS (#6287)

* fix: test e2e click “Show Code Actions” button then wait for listbox on macOS

* fix: trigger code actions during test with shortcut

* fix: add reasonable timeout to the menu and listbox call in test
This commit is contained in:
kvyb authored and GitHub committed 2025-09-18 02:30:54 +03:00
1 parent f08b0499d5
commit f237dda413
1 file changed
+8 -1
+8 -1
View File
@@ -11,7 +11,14 @@ export const addSelectedCodeToClineWebview = async (_page: Page) => {
await _page.locator("div:nth-child(4) > span > span").first().click()
await _page.getByRole("textbox", { name: "The editor is not accessible" }).press("ControlOrMeta+a")
await _page.getByRole("listbox", { name: /Show Code Actions / }).click()
// Open Code Actions via keyboard for cross-platform reliability
await _page.keyboard.press("ControlOrMeta+.")
// Wait for the Code Actions UI to appear (listbox or menu depending on platform/version)
try {
await _page.getByRole("listbox").first().waitFor({ state: "visible", timeout: 5000 })
} catch {
await _page.getByRole("menu").first().waitFor({ state: "visible", timeout: 5000 })
}
await _page.keyboard.press("Enter", { delay: 100 }) // First action - "Add to Cline"
}