From eb605a884c4abc7f5dbef112e2f60a2c76a80209 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:19:53 +0100 Subject: [PATCH] Fix Playwright strict mode violation in demo video clipboard tests (#952) --- src/spec/scenarios/copyTopicToClipboard.ts | 3 ++- src/spec/scenarios/copyValueToClipboard.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/spec/scenarios/copyTopicToClipboard.ts b/src/spec/scenarios/copyTopicToClipboard.ts index e7f6e43..29adb19 100644 --- a/src/spec/scenarios/copyTopicToClipboard.ts +++ b/src/spec/scenarios/copyTopicToClipboard.ts @@ -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) } diff --git a/src/spec/scenarios/copyValueToClipboard.ts b/src/spec/scenarios/copyValueToClipboard.ts index 7b9bc67..afe9982 100644 --- a/src/spec/scenarios/copyValueToClipboard.ts +++ b/src/spec/scenarios/copyValueToClipboard.ts @@ -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) }