Fix Playwright strict mode violation in demo video clipboard tests (#952)
This commit is contained in:
@@ -2,6 +2,7 @@ import { Page } from 'playwright'
|
|||||||
import { clickOn } from '../util'
|
import { clickOn } from '../util'
|
||||||
|
|
||||||
export async function copyTopicToClipboard(browser: Page) {
|
export async function copyTopicToClipboard(browser: Page) {
|
||||||
const copyButton = await browser.locator('[data-testid="copy-button"]')
|
// Select the copy button specifically in the Topic panel (not Value panel or MessageHistory)
|
||||||
|
const copyButton = browser.getByRole('button', { name: /Topic/i }).getByTestId('copy-button')
|
||||||
await clickOn(copyButton, 1)
|
await clickOn(copyButton, 1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Page } from 'playwright'
|
|||||||
import { clickOn } from '../util'
|
import { clickOn } from '../util'
|
||||||
|
|
||||||
export async function copyValueToClipboard(browser: Page) {
|
export async function copyValueToClipboard(browser: Page) {
|
||||||
const copyButton = await browser.getByRole('button', { name: 'Value' }).getByRole('button').first()
|
// Select the copy button specifically in the Value panel (not Topic panel or MessageHistory)
|
||||||
|
const copyButton = browser.getByRole('button', { name: /Value/i }).getByTestId('copy-button')
|
||||||
await clickOn(copyButton, 1)
|
await clickOn(copyButton, 1)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user