Skip to content

Commit 522aafa

Browse files
CR
1 parent 9b2bcda commit 522aafa

7 files changed

+22
-5
lines changed

core/src/components/tab-bar/test/expand/tab-bar.e2e.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,52 @@ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screensh
1010
test('should not have visual regressions', async ({ page }) => {
1111
await page.setContent(
1212
`
13+
<style>
14+
.container {
15+
padding: 20px 10px;
16+
}
17+
</style>
18+
1319
<ion-content>
14-
<ion-tab-bar expand="full"/>
20+
<div class="container">
21+
<ion-tab-bar expand="full"/>
22+
</div>
1523
</ion-content>
1624
`,
1725
config
1826
);
1927

2028
// Used the `ion-content` element to take the screenshot because the `ion-tab-bar`element would not be visible otherwise
21-
const content = page.locator('ion-content');
29+
const container = page.locator('.container');
2230

23-
await expect(content).toHaveScreenshot(screenshot(`tab-bar-expand-full`));
31+
await expect(container).toHaveScreenshot(screenshot(`tab-bar-expand-full`));
2432
});
2533
});
2634

2735
test.describe(title('compact'), () => {
2836
test('should not have visual regressions', async ({ page }) => {
2937
await page.setContent(
3038
`
39+
<style>
40+
.container {
41+
width: 55px;
42+
height: 95px;
43+
}
44+
</style>
45+
3146
<ion-content>
47+
<div class="container">
3248
<ion-tab-bar expand="compact"/>
49+
</div>
3350
</ion-content>
3451
`,
3552
config
3653
);
3754

3855
// Used the `ion-content` element to take the screenshot because the `ion-tab-bar` element would not be visible otherwise
39-
const content = page.locator('ion-content');
56+
const container = page.locator('.container');
4057

41-
await expect(content).toHaveScreenshot(screenshot(`tab-bar-expand-compact`));
58+
await expect(container).toHaveScreenshot(screenshot(`tab-bar-expand-compact`));
4259
});
4360
});
4461
});
-2.52 KB
Loading
Loading
-2.34 KB
Loading
-2.21 KB
Loading
-6.79 KB
Loading
-1.96 KB
Loading

0 commit comments

Comments
 (0)