Skip to content

Commit

Permalink
Skip test on unsupported platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Dec 22, 2023
1 parent 7cb615c commit c695fad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/page/page-fill.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ for (const [type, value] of Object.entries({
})) {
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.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.setContent(`<body><script>
const div = document.createElement('div');
Expand All @@ -126,13 +128,7 @@ for (const [type, value] of Object.entries({
});
await page.locator('input').fill(value);

[1,2,3].includes(1);
expect(await page.evaluate(() => window['firedEvents'])).toEqual(
((browserName !== 'chromium' && ['month', 'week'].includes(type)) ||
(browserName === 'webkit' && isWindows && ['color', 'date', 'time', 'datetime-local'].includes(type))) ?
['input:true'] :
['input:true', 'change:false']
);
expect(await page.evaluate(() => window['firedEvents'])).toEqual(['input:true', 'change:false']);
expect(await page.evaluate(() => window['firedBodyEvents'])).toEqual(['input:true']);
});
}
Expand Down

0 comments on commit c695fad

Please sign in to comment.