mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(input): fix flaky masking test (#26008)
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user