Skip to content

Commit 07c0767

Browse files
committed
test(toolbar): add test for images without set width
1 parent ae839d6 commit 07c0767

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

core/src/components/toolbar/test/basic/toolbar.e2e.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'], directi
3737
const header = page.locator('ion-header');
3838
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-slotted-images`));
3939
});
40+
41+
test('should not have visual regressions with slotted images with intrinsic width', async ({ page }) => {
42+
await page.setContent(
43+
`
44+
<ion-header>
45+
<ion-toolbar>
46+
<img src="https://picsum.photos/id/237/50/50" slot="start" />
47+
<ion-title>Image | Ion-Image</ion-title>
48+
<ion-img src="https://picsum.photos/id/237/50/50" slot="end"></ion-img>
49+
</ion-toolbar>
50+
</ion-header>
51+
`,
52+
config
53+
);
54+
55+
const header = page.locator('ion-header');
56+
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-slotted-images-intrinsic-width`));
57+
});
4058
});
4159
}
4260
);

0 commit comments

Comments
 (0)