From d29c6cd0cd54c44fadc67f446fbc976af8674bf8 Mon Sep 17 00:00:00 2001 From: Ryan Rosello Date: Sat, 6 Jul 2024 17:01:04 +1000 Subject: [PATCH] chore(html-reporter) add unit test for page title & favicon setter --- packages/html-reporter/src/testCaseView.spec.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/html-reporter/src/testCaseView.spec.tsx b/packages/html-reporter/src/testCaseView.spec.tsx index 3bde6e8a83..400459ae55 100644 --- a/packages/html-reporter/src/testCaseView.spec.tsx +++ b/packages/html-reporter/src/testCaseView.spec.tsx @@ -95,7 +95,13 @@ const linkRenderingTestCase: TestCase = { results: [result] }; -test('should correctly render links in annotations', async ({ mount }) => { +test.only('should correctly set the page title and favicon', async ({ mount, page }) => { + await mount(); + expect(await page.locator('link[rel="icon"]').getAttribute('href')).toEqual('../logo_expected.svg'); + expect(await page.title()).toEqual(`| ${linkRenderingTestCase.title}`); +}); + +test('should correctly render links in annotations', async ({ mount, page }) => { const component = await mount(); // const container = await(component.getByText('Annotations'));