Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cli): Target role tab #4768

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/cli/test/e2e/report.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ const BASE_PATH = '/bundle-stats.html';
test('should load overview panel', async ({ page }) => {
await page.goto(BASE_PATH);
await expect(page).toHaveTitle(/^Bundle Size — .*\./);
await expect(page.getByRole('link', { name: 'Overview', exact: true })).toHaveAttribute(
await expect(page.getByRole('tab', { name: 'Overview', exact: true })).toHaveAttribute(
'aria-current',
'page',
);
});

test('should load assets panel', async ({ page }) => {
await page.goto(`${BASE_PATH}#/assets`);
await expect(page.getByRole('link', { name: 'Assets', exact: true })).toHaveAttribute(
await expect(page.getByRole('tab', { name: 'Assets', exact: true })).toHaveAttribute(
'aria-current',
'page',
);
});

test('should load modules panel', async ({ page }) => {
await page.goto(`${BASE_PATH}#/modules`);
await expect(page.getByRole('link', { name: 'Modules', exact: true })).toHaveAttribute(
await expect(page.getByRole('tab', { name: 'Modules', exact: true })).toHaveAttribute(
'aria-current',
'page',
);
});

test('should load packages panel', async ({ page }) => {
await page.goto(`${BASE_PATH}#/packages`);
await expect(page.getByRole('link', { name: 'Packages', exact: true })).toHaveAttribute(
await expect(page.getByRole('tab', { name: 'Packages', exact: true })).toHaveAttribute(
'aria-current',
'page',
);
Expand All @@ -38,18 +38,18 @@ test('should load packages panel', async ({ page }) => {
test('should navigate to sections', async ({ page }) => {
await page.goto(BASE_PATH);

const overviewLink = page.getByRole('link', { name: 'Overview', exact: true });
const overviewLink = page.getByRole('tab', { name: 'Overview', exact: true });
await expect(overviewLink).toHaveAttribute('aria-current', 'page');

const assetsLink = page.getByRole('link', { name: 'Assets', exact: true });
const assetsLink = page.getByRole('tab', { name: 'Assets', exact: true });
await assetsLink.click();
await expect(assetsLink).toHaveAttribute('aria-current', 'page');

const modulesLink = page.getByRole('link', { name: 'Modules', exact: true });
const modulesLink = page.getByRole('tab', { name: 'Modules', exact: true });
await modulesLink.click();
await expect(modulesLink).toHaveAttribute('aria-current', 'page');

const packagesLink = page.getByRole('link', { name: 'Packages', exact: true });
const packagesLink = page.getByRole('tab', { name: 'Packages', exact: true });
await packagesLink.click();
await expect(packagesLink).toHaveAttribute('aria-current', 'page');
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.group + .group {
:not(.group:empty) ~ .group {
margin-top: calc(var(--space-xxxsmall) / 2);
padding-top: calc(var(--space-xxxsmall) / 2);
border-top: 1px solid var(--color-outline);
Expand Down