fix: use exact match for Replace All button to avoid strict mode violation

This commit is contained in:
bymyself
2026-04-14 19:39:02 +00:00
parent 9b91af567e
commit 24c124c20b

View File

@@ -59,7 +59,7 @@ test.describe('Node replacement', { tag: ['@node', '@ui'] }, () => {
await expect(swapGroup).toBeVisible()
await expect(swapGroup).toContainText('E2E_OldSampler')
await expect(
swapGroup.getByRole('button', { name: /replace all/i })
swapGroup.getByRole('button', { name: 'Replace All', exact: true })
).toBeVisible()
})
@@ -148,7 +148,9 @@ test.describe('Node replacement', { tag: ['@node', '@ui'] }, () => {
await expect(swapGroup).toContainText('E2E_OldUpscaler')
// Click "Replace All"
await swapGroup.getByRole('button', { name: /replace all/i }).click()
await swapGroup
.getByRole('button', { name: 'Replace All', exact: true })
.click()
// Swap group should disappear
await expect(swapGroup).toBeHidden()
@@ -166,7 +168,7 @@ test.describe('Node replacement', { tag: ['@node', '@ui'] }, () => {
comfyPage
}) => {
await getSwapNodesGroup(comfyPage.page)
.getByRole('button', { name: /replace all/i })
.getByRole('button', { name: 'Replace All', exact: true })
.click()
const workflow = await comfyPage.workflow.getExportedWorkflow()