Fix Playwright strict mode violation in demo video clipboard tests (#952)

This commit is contained in:
Copilot
2025-12-22 17:19:53 +01:00
committed by GitHub
parent 9868ac67fc
commit eb605a884c
2 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import { Page } from 'playwright'
import { clickOn } from '../util'
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)
}

View File

@@ -2,6 +2,7 @@ import { Page } from 'playwright'
import { clickOn } from '../util'
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)
}