From 86becf6178689f1d5cf4757216e298ea2637615b Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 17 Sep 2024 15:45:47 +0200 Subject: [PATCH] fix tests --- packages/html-reporter/src/testCaseView.spec.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/html-reporter/src/testCaseView.spec.tsx b/packages/html-reporter/src/testCaseView.spec.tsx index 72552f5184..7c9c99eeb3 100644 --- a/packages/html-reporter/src/testCaseView.spec.tsx +++ b/packages/html-reporter/src/testCaseView.spec.tsx @@ -81,9 +81,9 @@ test('should render copy buttons for annotations', async ({ mount, page, context const component = await mount(); await expect(component.getByText('Annotation text', { exact: false }).first()).toBeVisible(); - component.getByText('Annotation text', { exact: false }).first().hover(); - await expect(component.getByLabel('Copy to clipboard').first()).toBeVisible(); - await component.getByLabel('Copy to clipboard').first().click(); + await component.getByText('Annotation text', { exact: false }).first().hover(); + await expect(component.locator('.test-case-annotation').getByLabel('Copy to clipboard').first()).toBeVisible(); + await component.locator('.test-case-annotation').getByLabel('Copy to clipboard').first().click(); const handle = await page.evaluateHandle(() => navigator.clipboard.readText()); const clipboardContent = await handle.jsonValue(); expect(clipboardContent).toBe('Annotation text');