Skip to content

Commit d9f54cb

Browse files
committed
test(avatar): update snapshots to not be cut
1 parent 286dbf8 commit d9f54cb

56 files changed

Lines changed: 6 additions & 16 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/src/components/avatar/test/badge/badge.e2e.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ configs({ directions: ['ltr'], modes: ['md', 'ios', 'ionic-md'] }).forEach(({ co
2626
`
2727
<style>
2828
#container {
29-
display: flex;
30-
flex-wrap: wrap;
31-
gap: 40px;
32-
padding: 16px;
29+
display: grid;
30+
grid-template-columns: repeat(4, 1fr);
31+
gap: 20px;
3332
}
3433
</style>
3534
@@ -42,14 +41,6 @@ configs({ directions: ['ltr'], modes: ['md', 'ios', 'ionic-md'] }).forEach(({ co
4241

4342
const container = page.locator('#container');
4443

45-
/**
46-
* Avatars with badges overflow the default viewport, causing
47-
* unrendered areas to appear black in the screenshot.
48-
* Resizing to fit content.
49-
*/
50-
const box = await container.boundingBox();
51-
await page.setViewportSize({ width: Math.ceil(box!.width) + 40, height: Math.ceil(box!.height) + 32 });
52-
5344
await expect(container).toHaveScreenshot(screenshot(`avatar-${avatarSize}-badge`));
5445
});
5546
});
686 Bytes
1.24 KB
4.99 KB
277 Bytes
743 Bytes
3.92 KB
-1.31 KB
-2.52 KB
5.81 KB

0 commit comments

Comments
 (0)