diff --git a/core/src/components/input/test/masking/input.e2e.ts b/core/src/components/input/test/masking/input.e2e.ts index 88e2d6746d..1679659530 100644 --- a/core/src/components/input/test/masking/input.e2e.ts +++ b/core/src/components/input/test/masking/input.e2e.ts @@ -9,12 +9,17 @@ test.describe('input: masking', () => { test('should filter out spaces', async ({ page, skip }) => { skip.rtl(); + const ionInput = await page.spyOnEvent('ionInput'); const input = page.locator('#inputTrimmed'); await input.click(); + // Playwright types this in one character at a time. await page.keyboard.type('S p a c e s'); + await ionInput.next(); + // ionInput is called for each character. + await expect(ionInput).toHaveReceivedEventTimes(11); await expect(input).toHaveJSProperty('value', 'Spaces'); }); });