mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix(test): use role selector for Reka UI context menu
data-reka-context-menu-content attribute does not exist on Reka UI
ContextMenuContent. Use getByRole('menu') and getByRole('menuitem')
for reliable context menu detection.
This commit is contained in:
@@ -66,12 +66,15 @@ test.describe('Workflow tabs', () => {
|
||||
|
||||
await topbar.getTab(0).click({ button: 'right' })
|
||||
|
||||
const contextMenu = comfyPage.page.locator(
|
||||
'[data-reka-context-menu-content]'
|
||||
)
|
||||
await expect(contextMenu).toBeVisible()
|
||||
// Reka UI ContextMenuContent renders with role="menu"
|
||||
const contextMenu = comfyPage.page.getByRole('menu')
|
||||
await expect(contextMenu).toBeVisible({ timeout: 5000 })
|
||||
|
||||
await expect(contextMenu).toContainText('Close Tab')
|
||||
await expect(contextMenu).toContainText('Save')
|
||||
await expect(
|
||||
contextMenu.getByRole('menuitem', { name: /Close Tab/i })
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
contextMenu.getByRole('menuitem', { name: /Save/i })
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user