('chip/NotExpandable');
await expect(component.getByRole('button')).toHaveCount(0);
- await expect(component.getByText('Body')).toBeVisible();
+ await expect(component).toMatchAriaSnapshot(`
+ - heading "Title" [level=2]
+ - region: Body
+ `);
});
test('expand collapse with the keyboard', async ({ mount, page }) => {
diff --git a/packages/html-reporter/src/chip.tsx b/packages/html-reporter/src/chip.tsx
index 1a6926e36c28b..b206188cab1fe 100644
--- a/packages/html-reporter/src/chip.tsx
+++ b/packages/html-reporter/src/chip.tsx
@@ -47,9 +47,9 @@ export const Chip: React.FC<{
onClick={() => setExpanded(!expanded)}
title={title}>
{headerContent}
- :
+ :
{headerContent}
-
}
+ }
{(!setExpanded || expanded) &&
{children}
{body && body()}
diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.ts
index 9ce7ac74a2569..3c0a31e733247 100644
--- a/tests/playwright-test/reporter-html.spec.ts
+++ b/tests/playwright-test/reporter-html.spec.ts
@@ -3431,7 +3431,7 @@ for (const useIntermediateMergeReport of [true, false] as const) {
await expect(page.getByRole('link', { name: 'Speedboard' })).toHaveAttribute('aria-selected', 'true');
await expect(page).toMatchAriaSnapshot(`
- - text: /Slowest Tests/
+ - heading "Slowest Tests" [level=2]
- region:
- list:
- listitem:
@@ -3455,7 +3455,7 @@ for (const useIntermediateMergeReport of [true, false] as const) {
`);
await page.getByText('foo').first().click();
await expect(page).toMatchAriaSnapshot(`
- - text: /Slowest Tests/
+ - heading "Slowest Tests" [level=2]
`);
await page.getByRole('link', { name: 'Failed' }).click();