Skip to content

Commit 59d7631

Browse files
committed
fix(tab-button): apply code review feedback v2
1 parent 585a801 commit 59d7631

7 files changed

+15
-12
lines changed

core/src/components/tab-button/test/states/tab-button.e2e.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,23 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
8282
});
8383

8484
configs({ palettes: ['dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
85-
test.describe(title('tab-button: focused state in dark palette'), () => {
86-
test('should not have visual regressions for focused tab button', async ({ page }) => {
87-
await page.setContent(
88-
`
89-
<ion-tab-bar style="width: 300px">
90-
<ion-tab-button href="#" class="ion-focused">
91-
<ion-label>Favorites</ion-label>
92-
</ion-tab-button>
93-
</ion-tab-bar>
85+
test.describe(title('tab-button: states in dark palette'), () => {
86+
test.describe('focus', () => {
87+
test('should render correct focus state in dark palette', async ({ page }) => {
88+
await page.setContent(
89+
`
90+
<ion-tab-bar style="width: 300px">
91+
<ion-tab-button href="#" class="ion-focused">
92+
<ion-label>Favorites</ion-label>
93+
</ion-tab-button>
94+
</ion-tab-bar>
9495
`,
95-
config
96-
);
96+
config
97+
);
9798

98-
await expect(page.locator('ion-tab-bar')).toHaveScreenshot(screenshot('tab-bar-focused-dark'));
99+
const tabBar = page.locator('ion-tab-bar');
100+
await expect(tabBar).toHaveScreenshot(screenshot('tab-button-focus'));
101+
});
99102
});
100103
});
101104
});

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-ios-ltr-dark-Mobile-Chrome-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-ios-ltr-dark-Mobile-Chrome-linux.png

File renamed without changes.

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-ios-ltr-dark-Mobile-Firefox-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-ios-ltr-dark-Mobile-Firefox-linux.png

File renamed without changes.

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-ios-ltr-dark-Mobile-Safari-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-ios-ltr-dark-Mobile-Safari-linux.png

File renamed without changes.

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-md-ltr-dark-Mobile-Chrome-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-md-ltr-dark-Mobile-Chrome-linux.png

File renamed without changes.

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-md-ltr-dark-Mobile-Firefox-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-md-ltr-dark-Mobile-Firefox-linux.png

File renamed without changes.

core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-bar-focused-dark-md-ltr-dark-Mobile-Safari-linux.png renamed to core/src/components/tab-button/test/states/tab-button.e2e.ts-snapshots/tab-button-focus-md-ltr-dark-Mobile-Safari-linux.png

File renamed without changes.

0 commit comments

Comments
 (0)