mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
test: test gardening (#10258)
This commit is contained in:
parent
7048ecdc6f
commit
80da0f7b69
@ -19,6 +19,7 @@ import type { TestInfo } from '@playwright/test';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { start } from '../packages/playwright-core/lib/outofprocess';
|
||||
import { spawnSync } from 'child_process';
|
||||
|
||||
const chromeDriver = require('chromedriver').path;
|
||||
const brokenDriver = path.join(__dirname, 'assets', 'selenium-grid', 'broken-selenium-driver.js');
|
||||
@ -34,7 +35,11 @@ function writeSeleniumConfig(testInfo: TestInfo, port: number) {
|
||||
}
|
||||
|
||||
test.skip(({ mode }) => mode !== 'default', 'Using test hooks');
|
||||
test.skip(() => !!process.env.INSIDE_DOCKER, 'Docker image does not have Java');
|
||||
test.skip(() => {
|
||||
// Skip if Java is not installed.
|
||||
const { status, error } = spawnSync('java', ['-version']);
|
||||
return !!error || status !== 0;
|
||||
});
|
||||
test.slow();
|
||||
|
||||
test('selenium grid 3.141.59 standalone chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
|
@ -105,9 +105,10 @@ it('should intercept network activity from worker', async function({ page, serve
|
||||
expect(msg.text()).toBe('intercepted');
|
||||
});
|
||||
|
||||
it('should intercept network activity from worker 2', async function({ page, server, isElectron, isAndroid, browserName }) {
|
||||
it('should intercept network activity from worker 2', async function({ page, server, isElectron, isAndroid, browserName, browserMajorVersion }) {
|
||||
it.skip(isAndroid);
|
||||
it.fixme(isElectron);
|
||||
it.fixme(browserName === 'chromium' && browserMajorVersion === 97, '@see https://github.com/microsoft/playwright/issues/10048');
|
||||
|
||||
const url = server.PREFIX + '/worker/worker.js';
|
||||
await page.route(url, route => {
|
||||
|
@ -268,12 +268,15 @@ it('should behave the same way for headers and allHeaders', async ({ page, serve
|
||||
expect(allHeaders['name-b']).toEqual('v4');
|
||||
});
|
||||
|
||||
it('should provide a Response with a file URL', async ({ page, asset, isAndroid, browserName }) => {
|
||||
it('should provide a Response with a file URL', async ({ page, asset, isAndroid, isElectron, isWindows, browserName }) => {
|
||||
it.skip(isAndroid, 'No files on Android');
|
||||
it.fixme(browserName === 'firefox', 'Firefox does return null for file:// URLs');
|
||||
|
||||
const fileurl = url.pathToFileURL(asset('frames/two-frames.html')).href;
|
||||
const response = await page.goto(fileurl);
|
||||
expect(response.status()).toBe(0);
|
||||
if (isElectron || (browserName === 'webkit' && isWindows))
|
||||
expect(response.status()).toBe(200);
|
||||
else
|
||||
expect(response.status()).toBe(0);
|
||||
expect(response.ok()).toBe(true);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user