Skip to content

Commit 9b98a56

Browse files
committed
chore: update aria snapshot
1 parent 8e77c76 commit 9b98a56

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

showcases/e2e/default.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,18 @@ export const runAriaSnapshotTest = ({
270270

271271
let snapshot = await page.locator('main').ariaSnapshot();
272272

273-
const showcase = process.env.showcase;
274-
275-
if (isAngular(showcase)) {
276-
snapshot = snapshot.replaceAll('angular', 'react');
277-
} else if (isStencil(showcase)) {
278-
snapshot = snapshot.replaceAll('stencil', 'react');
279-
} else if (isVue(showcase)) {
280-
snapshot = snapshot.replaceAll('vue', 'react');
281-
}
273+
// Remove `/url` in snapshot because they differ in every showcase
274+
snapshot = snapshot
275+
.split('\n')
276+
.map((line) => {
277+
if (line.includes('/url:')) {
278+
return undefined;
279+
}
280+
281+
return line;
282+
})
283+
.filter(Boolean)
284+
.join('\n');
282285

283286
expect(snapshot).toMatchSnapshot(`${title}.yaml`);
284287
});

0 commit comments

Comments
 (0)