From 9b2e777c20c19549e656837cb1db631506230d2e Mon Sep 17 00:00:00 2001 From: Anthony Roberts Date: Mon, 22 Jul 2024 15:22:18 +1000 Subject: [PATCH] add test for copy button --- packages/html-reporter/src/testCaseView.spec.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/html-reporter/src/testCaseView.spec.tsx b/packages/html-reporter/src/testCaseView.spec.tsx index afe06cebcb..68f5738971 100644 --- a/packages/html-reporter/src/testCaseView.spec.tsx +++ b/packages/html-reporter/src/testCaseView.spec.tsx @@ -76,6 +76,12 @@ test('should render test case', async ({ mount }) => { await expect(component.getByText('My test')).toBeVisible(); }); +test('should render copy buttons for annotations', async ({ mount }) => { + const component = await mount(); + await expect(component.getByText('Annotation text', { exact: false }).first()).toBeVisible(); + await expect(component.getByRole('button').first()).toBeVisible(); +}); + const annotationLinkRenderingTestCase: TestCase = { testId: 'testid', title: 'My test',