test: update expectations for WebKit Windows (#28774)

Reference https://github.com/microsoft/playwright/issues/28726
This commit is contained in:
Yury Semikhatsky 2023-12-22 16:02:23 -08:00 committed by GitHub
parent 32ecb07f64
commit b00fbdb388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,8 +98,10 @@ for (const [type, value] of Object.entries({
'range': '42', 'range': '42',
'week': '2020-W50' 'week': '2020-W50'
})) { })) {
it(`input event.composed should be true and cross shadow dom boundary - ${type}`, async ({ page, server, browserName }) => { it(`input event.composed should be true and cross shadow dom boundary - ${type}`, async ({ page, server, browserName, isWindows }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28726' }); it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28726' });
it.skip(browserName !== 'chromium' && ['month', 'week'].includes(type), 'Some browser/platforms do not implement certain input types');
it.skip(browserName === 'webkit' && isWindows && ['color', 'date', 'time', 'datetime-local'].includes(type), 'Some browser/platforms do not implement certain input types');
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
await page.setContent(`<body><script> await page.setContent(`<body><script>
const div = document.createElement('div'); const div = document.createElement('div');
@ -126,11 +128,7 @@ for (const [type, value] of Object.entries({
}); });
await page.locator('input').fill(value); await page.locator('input').fill(value);
expect(await page.evaluate(() => window['firedEvents'])).toEqual( expect(await page.evaluate(() => window['firedEvents'])).toEqual(['input:true', 'change:false']);
(browserName !== 'chromium' && (type === 'month' || type === 'week')) ?
['input:true'] :
['input:true', 'change:false']
);
expect(await page.evaluate(() => window['firedBodyEvents'])).toEqual(['input:true']); expect(await page.evaluate(() => window['firedBodyEvents'])).toEqual(['input:true']);
}); });
} }