add test for copy button

This commit is contained in:
Anthony Roberts 2024-07-22 15:22:18 +10:00
parent caa6986577
commit 9b2e777c20

View file

@ -76,6 +76,12 @@ test('should render test case', async ({ mount }) => {
await expect(component.getByText('My test')).toBeVisible(); await expect(component.getByText('My test')).toBeVisible();
}); });
test('should render copy buttons for annotations', async ({ mount }) => {
const component = await mount(<TestCaseView projectNames={['chromium', 'webkit']} test={testCase} run={0} anchor=''></TestCaseView>);
await expect(component.getByText('Annotation text', { exact: false }).first()).toBeVisible();
await expect(component.getByRole('button').first()).toBeVisible();
});
const annotationLinkRenderingTestCase: TestCase = { const annotationLinkRenderingTestCase: TestCase = {
testId: 'testid', testId: 'testid',
title: 'My test', title: 'My test',