diff --git a/core/playwright.config.ts b/core/playwright.config.ts
index 6336c28a48..91d1885b92 100644
--- a/core/playwright.config.ts
+++ b/core/playwright.config.ts
@@ -85,7 +85,10 @@ const config: PlaywrightTestConfig = {
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
- retries: process.env.CI ? 2 : 0,
+ /* Fail fast on CI */
+ maxFailures: process.env.CI ? 1 : 0,
+ /* Flaky test should be either addressed or disabled until we can address them */
+ retries: 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts b/core/src/components/datetime/test/basic/datetime.e2e.ts
index bb6341aff5..21cc0640f4 100644
--- a/core/src/components/datetime/test/basic/datetime.e2e.ts
+++ b/core/src/components/datetime/test/basic/datetime.e2e.ts
@@ -304,10 +304,13 @@ test.describe('datetime: visibility', () => {
await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.setProperty('display', 'none'));
await expect(datetime).toBeHidden();
+ await expect(datetime).not.toHaveClass(/datetime-ready/);
await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.removeProperty('display'));
await expect(datetime).toBeVisible();
+ await page.waitForSelector('.datetime-ready');
+
// month/year interface should be reset
await expect(monthYearInterface).toBeHidden();
});
diff --git a/core/src/components/datetime/test/presentation/datetime.e2e.ts b/core/src/components/datetime/test/presentation/datetime.e2e.ts
index 868eea9ef1..6ddd7edec8 100644
--- a/core/src/components/datetime/test/presentation/datetime.e2e.ts
+++ b/core/src/components/datetime/test/presentation/datetime.e2e.ts
@@ -159,9 +159,10 @@ class TimePickerFixture {
}
async goto() {
- await this.page.goto(`/src/components/datetime/test/presentation`);
- await this.page.locator('select').selectOption('time');
- await this.page.waitForSelector('.datetime-presentation-time');
+ await this.page.setContent(`
+
+ `);
+ await this.page.waitForSelector('.datetime-ready');
this.timePicker = this.page.locator('ion-datetime');
}
diff --git a/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts b/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts
index b6e124c04d..a93f199b52 100644
--- a/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts
+++ b/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts
@@ -40,7 +40,8 @@ test.describe('item-sliding: basic', () => {
expect(await item.screenshot()).toMatchSnapshot(`item-sliding-gesture-${page.getSnapshotSettings()}.png`);
});
- test('should not scroll when the item-sliding is swiped', async ({ page, skip }) => {
+ // TODO FW-3006
+ test.skip('should not scroll when the item-sliding is swiped', async ({ page, skip }) => {
skip.browser('webkit', 'mouse.wheel is not available in WebKit');
skip.rtl();
diff --git a/core/src/components/item-sliding/test/scroll-target/item-sliding.e2e.ts b/core/src/components/item-sliding/test/scroll-target/item-sliding.e2e.ts
index 9f8f1d7803..e8e0a20d7d 100644
--- a/core/src/components/item-sliding/test/scroll-target/item-sliding.e2e.ts
+++ b/core/src/components/item-sliding/test/scroll-target/item-sliding.e2e.ts
@@ -2,7 +2,8 @@ import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('item-sliding: scroll-target', () => {
- test('should not scroll when the item-sliding is swiped in custom scroll target', async ({ page, skip }) => {
+ // TODO FW-3006
+ test.skip('should not scroll when the item-sliding is swiped in custom scroll target', async ({ page, skip }) => {
skip.browser('webkit', 'mouse.wheel is not available in WebKit');
skip.rtl();
diff --git a/core/src/components/picker-column-internal/test/disabled/picker-column-internal.e2e.ts b/core/src/components/picker-column-internal/test/disabled/picker-column-internal.e2e.ts
index 879f3ff6e8..3362ac7d22 100644
--- a/core/src/components/picker-column-internal/test/disabled/picker-column-internal.e2e.ts
+++ b/core/src/components/picker-column-internal/test/disabled/picker-column-internal.e2e.ts
@@ -60,7 +60,7 @@ test.describe('picker-column-internal: disabled', () => {
`);
const disabledItem = page.locator('ion-picker-column-internal .picker-item.picker-item-disabled');
- expect(disabledItem).not.toBeEnabled();
+ await expect(disabledItem).not.toBeEnabled();
});
test('disabled picker item should not be considered active', async ({ page }) => {
await page.setContent(`
@@ -79,7 +79,7 @@ test.describe('picker-column-internal: disabled', () => {
`);
const disabledItem = page.locator('ion-picker-column-internal .picker-item[data-value="b"]');
- expect(disabledItem).not.toHaveClass(/picker-item-active/);
+ await expect(disabledItem).not.toHaveClass(/picker-item-active/);
});
test('setting the value to a disabled item should not cause that item to be active', async ({ page }) => {
await page.setContent(`
@@ -103,8 +103,8 @@ test.describe('picker-column-internal: disabled', () => {
await page.waitForChanges();
const disabledItem = page.locator('ion-picker-column-internal .picker-item[data-value="b"]');
- expect(disabledItem).toHaveClass(/picker-item-disabled/);
- expect(disabledItem).not.toHaveClass(/picker-item-active/);
+ await expect(disabledItem).toHaveClass(/picker-item-disabled/);
+ await expect(disabledItem).not.toHaveClass(/picker-item-active/);
});
test('defaulting the value to a disabled item should not cause that item to be active', async ({ page }) => {
await page.setContent(`
@@ -124,7 +124,7 @@ test.describe('picker-column-internal: disabled', () => {
`);
const disabledItem = page.locator('ion-picker-column-internal .picker-item[data-value="b"]');
- expect(disabledItem).toHaveClass(/picker-item-disabled/);
- expect(disabledItem).not.toHaveClass(/picker-item-active/);
+ await expect(disabledItem).toHaveClass(/picker-item-disabled/);
+ await expect(disabledItem).not.toHaveClass(/picker-item-active/);
});
});
diff --git a/core/src/utils/tap-click/test/tap-click.e2e.ts b/core/src/utils/tap-click/test/tap-click.e2e.ts
index 29512706c9..b8238dca99 100644
--- a/core/src/utils/tap-click/test/tap-click.e2e.ts
+++ b/core/src/utils/tap-click/test/tap-click.e2e.ts
@@ -1,3 +1,4 @@
+import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('tap click utility', () => {
@@ -14,8 +15,9 @@ test.describe('tap click utility', () => {
if (box) {
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await page.mouse.down();
+ await page.waitForChanges();
}
- await page.waitForSelector('button.ion-activated');
+ await expect(button).toHaveClass(/ion-activated/);
});
});
diff --git a/core/src/utils/test/overlays/overlays.e2e.ts b/core/src/utils/test/overlays/overlays.e2e.ts
index 5c18b933ba..54f40bb3c3 100644
--- a/core/src/utils/test/overlays/overlays.e2e.ts
+++ b/core/src/utils/test/overlays/overlays.e2e.ts
@@ -113,22 +113,26 @@ test.describe('overlays: focus', () => {
Show Modal
-
+
`);
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
+ const ionModalWillPresent = await page.spyOnEvent('ionModalWillPresent');
const button = page.locator('ion-button');
- const input = page.locator('ion-input');
+ const input = page.locator('input');
await button.click();
- await input.evaluate((el: HTMLIonInputElement) => el.setFocus());
+
+ await ionModalWillPresent.next();
+
+ await input.evaluate((el: HTMLInputElement) => el.focus());
await ionModalDidPresent.next();
await page.waitForChanges();
- await expect(page.locator('ion-input input')).toBeFocused();
+ await expect(input).toBeFocused();
});
test('should not select a hidden focusable element', async ({ page, browserName }) => {