chore(html-reporter) add unit test for page title & favicon setter

This commit is contained in:
Ryan Rosello 2024-07-06 17:01:04 +10:00
parent 2dcbe91914
commit d29c6cd0cd

View file

@ -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(<TestCaseView projectNames={['chromium', 'webkit']} test={linkRenderingTestCase} run={0} anchor=''></TestCaseView>);
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(<TestCaseView projectNames={['chromium', 'webkit']} test={linkRenderingTestCase} run={0} anchor=''></TestCaseView>);
// const container = await(component.getByText('Annotations'));