diff --git a/packages/cli/test/e2e/report.spec.js b/packages/cli/test/e2e/report.spec.js index 19e1b8b615..3ba23efc37 100644 --- a/packages/cli/test/e2e/report.spec.js +++ b/packages/cli/test/e2e/report.spec.js @@ -34,3 +34,22 @@ test('should load packages panel', async ({ page }) => { 'page', ); }); + +test('should navigate to sections', async ({ page }) => { + await page.goto(BASE_PATH); + + const overviewLink = page.getByRole('link', { name: 'Overview', exact: true }); + await expect(overviewLink).toHaveAttribute('aria-current', 'page'); + + const assetsLink = page.getByRole('link', { name: 'Assets', exact: true }); + await assetsLink.click(); + await expect(assetsLink).toHaveAttribute('aria-current', 'page'); + + const modulesLink = page.getByRole('link', { name: 'Modules', exact: true }); + await modulesLink.click(); + await expect(modulesLink).toHaveAttribute('aria-current', 'page'); + + const packagesLink = page.getByRole('link', { name: 'Packages', exact: true }); + await packagesLink.click(); + await expect(packagesLink).toHaveAttribute('aria-current', 'page'); +});