From a002572dd28ab35cf23ac1ebdc058657ba4f641c Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Mon, 17 Jun 2024 10:20:57 -0700 Subject: [PATCH] test: update some test conditions (#31336) --- tests/page/page-drag.spec.ts | 11 +++++------ tests/page/page-request-intercept.spec.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/page/page-drag.spec.ts b/tests/page/page-drag.spec.ts index dcf63681a85bc..c227978f23268 100644 --- a/tests/page/page-drag.spec.ts +++ b/tests/page/page-drag.spec.ts @@ -18,10 +18,12 @@ import type { ElementHandle, Route } from 'playwright-core'; import { test as it, expect } from './pageTest'; import { attachFrame } from '../config/utils'; +it.skip(({ browserName, browserMajorVersion }) => browserName === 'chromium' && browserMajorVersion < 91); +it.fixme(({ headless, isLinux }) => isLinux && !headless, 'Stray mouse events on Linux headed mess up the tests.'); +it.fixme(({ headless, isWindows, browserName }) => isWindows && !headless && browserName === 'webkit', 'WebKit win also send stray mouse events.'); + it.describe('Drag and drop', () => { - it.skip(({ browserName, browserMajorVersion }) => browserName === 'chromium' && browserMajorVersion < 91); 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 }) => { await page.goto(server.PREFIX + '/drag-n-drop.html'); @@ -258,9 +260,7 @@ it.describe('Drag and drop', () => { expect(await page.$eval('#target', target => target.contains(document.querySelector('#source')))).toBe(true); }); - it('should be able to drag the mouse in a frame', async ({ page, server, isAndroid }) => { - it.fixme(isAndroid); - + it('should be able to drag the mouse in a frame', async ({ page, server }) => { await page.goto(server.PREFIX + '/frames/one-frame.html'); const eventsHandle = await trackEvents(await page.frames()[1].$('html')); await page.mouse.move(30, 30); @@ -336,7 +336,6 @@ it.describe('Drag and drop', () => { }); 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')); await page.mouse.move(50, 50); await page.mouse.down(); diff --git a/tests/page/page-request-intercept.spec.ts b/tests/page/page-request-intercept.spec.ts index e87d99a87a584..8b0b82bedfc19 100644 --- a/tests/page/page-request-intercept.spec.ts +++ b/tests/page/page-request-intercept.spec.ts @@ -177,7 +177,7 @@ it('should give access to the intercepted response body', async ({ page, server, it('should intercept multipart/form-data request body', async ({ page, server, asset, browserName }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/14624' }); - it.fail(browserName !== 'firefox'); + it.fixme(browserName !== 'firefox'); await page.goto(server.PREFIX + '/input/fileupload.html'); const filePath = path.relative(process.cwd(), asset('file-to-upload.txt')); await page.locator('input[type=file]').setInputFiles(filePath);