Skip to content

Commit 3f4fef9

Browse files
fix lint and add comments
1 parent 7cdcefd commit 3f4fef9

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

core/src/components/modal/test/sheet/modal.e2e.ts

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
import { expect } from '@playwright/test';
22
import { configs, test, dragElementBy } from '@utils/test/playwright';
33

4-
configs({ modes: ['ios', "md", "ionic-ios", "ionic-md"], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
5-
test.describe(title('sheet modal: rendering'), () => {
6-
test('should not have visual regressions', async ({ page }) => {
7-
await page.goto('/src/components/modal/test/sheet', config);
8-
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
4+
configs({ modes: ['ios', 'md', 'ionic-ios', 'ionic-md'], directions: ['ltr'] }).forEach(
5+
({ title, screenshot, config }) => {
6+
test.describe(title('sheet modal: rendering'), () => {
7+
test('should not have visual regressions', async ({ page }) => {
8+
await page.goto('/src/components/modal/test/sheet', config);
9+
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
910

10-
await page.click('#sheet-modal');
11+
await page.click('#sheet-modal');
1112

12-
await ionModalDidPresent.next();
13+
await ionModalDidPresent.next();
1314

14-
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
15-
/**
16-
* Animations must be enabled to capture the screenshot.
17-
* By default, animations are disabled with toHaveScreenshot,
18-
* and when capturing the screenshot will call animation.finish().
19-
* This will cause the modal to close and the screenshot capture
20-
* to be invalid.
21-
*/
22-
animations: 'allow',
15+
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
16+
/**
17+
* Animations must be enabled to capture the screenshot.
18+
* By default, animations are disabled with toHaveScreenshot,
19+
* and when capturing the screenshot will call animation.finish().
20+
* This will cause the modal to close and the screenshot capture
21+
* to be invalid.
22+
*/
23+
animations: 'allow',
24+
});
2325
});
2426
});
25-
});
26-
});
27+
}
28+
);
2729

28-
configs({ modes: ["ionic-ios", 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
30+
configs({ modes: ['ionic-ios', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
2931
test.describe(title('sheet modal: half screen rendering'), () => {
3032
test('should not have visual regressions', async ({ page }) => {
3133
await page.goto('/src/components/modal/test/sheet', config);
@@ -62,7 +64,7 @@ configs({ modes: ["ionic-ios", 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
6264
});
6365
});
6466

65-
configs({ modes: ['ios', "ionic-ios"], directions: ['ltr'] }).forEach(({ title, config }) => {
67+
configs({ modes: ['ios', 'ionic-ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
6668
test.describe(title('sheet modal: backdrop'), () => {
6769
test.beforeEach(async ({ page }) => {
6870
await page.goto('/src/components/modal/test/sheet', config);

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
import { expect } from '@playwright/test';
22
import { configs, test } from '@utils/test/playwright';
33

4-
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
5-
test.describe(title('toolbar: basic (LTR only)'), () => {
6-
test('should not have visual regressions with text only', async ({ page }) => {
7-
await page.setContent(
8-
`
4+
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'], directions: ['ltr'] }).forEach(
5+
({ title, screenshot, config }) => {
6+
test.describe(title('toolbar: basic (LTR only)'), () => {
7+
test('should not have visual regressions with text only', async ({ page }) => {
8+
await page.setContent(
9+
`
910
<ion-header>
1011
<ion-toolbar>
1112
<ion-title>Toolbar</ion-title>
1213
</ion-toolbar>
1314
</ion-header>
1415
`,
15-
config
16-
);
16+
config
17+
);
1718

18-
const header = page.locator('ion-header');
19-
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-only`));
19+
const header = page.locator('ion-header');
20+
await expect(header).toHaveScreenshot(screenshot(`toolbar-basic-text-only`));
21+
});
2022
});
21-
});
22-
});
23+
}
24+
);
2325

2426
configs({ modes: ['ios', 'md', 'ionic-md'], palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
2527
test.describe(title('toolbar: basic'), () => {

core/src/components/toolbar/toolbar.ionic.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717

1818
.toolbar-container {
1919
gap: globals.$ion-space-400;
20+
// TODO(ROU-10853): replace this value with a layer token
2021
z-index: 10;
2122
}
2223

2324
// Toolbar: Transparent
2425
// --------------------------------------------------
2526

2627
.toolbar-background {
28+
// TODO(ROU-10853): replace this value with a layer token
2729
z-index: -1;
2830
}
2931

0 commit comments

Comments
 (0)