test: disable page-drag tests in headed linux (#31280)

The tests have been flaking across browsers apparently due to stray
mouse event sent by the OS.

See
https://devops.playwright.dev/flakiness.html#filter_spec=page%2Fpage-drag.spec.ts&show_flaky=true&timestamp=1718225128508
This commit is contained in:
Yury Semikhatsky 2024-06-12 15:09:56 -07:00 committed by GitHub
parent fbb44b043b
commit 9a31821411
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ import { attachFrame } from '../config/utils';
it.describe('Drag and drop', () => { it.describe('Drag and drop', () => {
it.skip(({ browserName, browserMajorVersion }) => browserName === 'chromium' && browserMajorVersion < 91); it.skip(({ browserName, browserMajorVersion }) => browserName === 'chromium' && browserMajorVersion < 91);
it.skip(({ isAndroid }) => isAndroid, 'No drag&drop on Android.'); it.skip(({ isAndroid }) => isAndroid, 'No drag&drop on Android.');
it.fixme(({ headless, isLinux }) => isLinux && !headless, 'Stray mouse events on Linux headed mess up the tests.');
it('should work @smoke', async ({ page, server }) => { it('should work @smoke', async ({ page, server }) => {
await page.goto(server.PREFIX + '/drag-n-drop.html'); await page.goto(server.PREFIX + '/drag-n-drop.html');
@ -334,7 +335,8 @@ it.describe('Drag and drop', () => {
}); });
}); });
it('should work if not doing a drag', async ({ page }) => { it('should work if not doing a drag', async ({ page, isLinux, headless }) => {
it.fixme(isLinux && !headless, 'Stray mouse events on Linux headed mess up the tests.');
const eventsHandle = await trackEvents(await page.$('html')); const eventsHandle = await trackEvents(await page.$('html'));
await page.mouse.move(50, 50); await page.mouse.move(50, 50);
await page.mouse.down(); await page.mouse.down();