test: cleanup bad usages of pageTest (#6430)

This commit is contained in:
Dmitry Gozman 2021-05-06 07:08:22 -07:00 committed by GitHub
parent 67f98d00eb
commit 217cbe3e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 112 additions and 131 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "playwright-internal",
"version": "1.11.0-next",
"version": "1.12.0-next",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -15,13 +15,10 @@
* limitations under the License.
*/
import { test as it, expect } from './config/pageTest';
import { contextTest as it, expect } from './config/browserTest';
import { browserTest } from './config/browserTest';
import { verifyViewport } from './config/utils';
it.skip(({ isAndroid }) => isAndroid, 'Default viewport is null');
it.skip(({ isElectron }) => isElectron, 'Default viewport is null');
it('should get the proper default viewport size', async ({page, server}) => {
await verifyViewport(page, 1280, 720);
});

View File

@ -15,16 +15,14 @@
* limitations under the License.
*/
import { test as pageTest, expect } from '../config/pageTest';
import { contextTest as test, expect } from '../config/browserTest';
import { playwrightTest } from '../config/browserTest';
import http from 'http';
pageTest.describe('chromium', () => {
pageTest.skip(({ browserName }) => browserName !== 'chromium');
pageTest.skip(({ isAndroid }) => isAndroid);
pageTest.skip(({ isElectron }) => isElectron);
test.describe('chromium', () => {
test.skip(({ browserName }) => browserName !== 'chromium');
pageTest('should create a worker from a service worker', async ({page, server}) => {
test('should create a worker from a service worker', async ({page, server}) => {
const [worker] = await Promise.all([
page.context().waitForEvent('serviceworker'),
page.goto(server.PREFIX + '/serviceworkers/empty/sw.html')
@ -32,7 +30,7 @@ pageTest.describe('chromium', () => {
expect(await worker.evaluate(() => self.toString())).toBe('[object ServiceWorkerGlobalScope]');
});
pageTest('serviceWorkers() should return current workers', async ({page, server}) => {
test('serviceWorkers() should return current workers', async ({page, server}) => {
const context = page.context();
const [worker1] = await Promise.all([
context.waitForEvent('serviceworker'),
@ -51,7 +49,7 @@ pageTest.describe('chromium', () => {
expect(workers).toContain(worker2);
});
pageTest('should not create a worker from a shared worker', async ({page, server}) => {
test('should not create a worker from a shared worker', async ({page, server}) => {
await page.goto(server.EMPTY_PAGE);
let serviceWorkerCreated;
page.context().once('serviceworker', () => serviceWorkerCreated = true);
@ -61,7 +59,7 @@ pageTest.describe('chromium', () => {
expect(serviceWorkerCreated).not.toBeTruthy();
});
pageTest('Page.route should work with intervention headers', async ({server, page}) => {
test('Page.route should work with intervention headers', async ({server, page}) => {
server.setRoute('/intervention', (req, res) => res.end(`
<script>
document.write('<script src="${server.CROSS_PROCESS_PREFIX}/intervention.js">' + '</scr' + 'ipt>');

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { contextTest as it, expect } from '../config/browserTest';
it.describe('CSS Coverage', () => {
it.skip(({ browserName }) => browserName !== 'chromium');

View File

@ -14,11 +14,10 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { contextTest as it, expect } from '../config/browserTest';
it.describe('JS Coverage', () => {
it.skip(({ browserName }) => browserName !== 'chromium');
it.fixme(({ isElectron }) => isElectron);
it('should work', async function({page, server}) {
await page.coverage.startJSCoverage();

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { contextTest as it, expect } from '../config/browserTest';
import { browserTest } from '../config/browserTest';
it.describe('session', () => {

View File

@ -16,7 +16,7 @@
import * as folio from 'folio';
import * as path from 'path';
import { test as pageTest } from './pageTest';
import { test as pageTest } from '../page/pageTest';
import { AndroidEnv, androidTest } from './androidTest';
import type { BrowserContext } from '../../index';

View File

@ -17,7 +17,7 @@
import * as folio from 'folio';
import * as path from 'path';
import { playwrightTest, slowPlaywrightTest, contextTest, tracingTest } from './browserTest';
import { test as pageTest } from './pageTest';
import { test as pageTest } from '../page/pageTest';
import { BrowserName, CommonArgs } from './baseTest';
import type { Browser, BrowserContext } from '../../index';

View File

@ -17,7 +17,7 @@
import * as folio from 'folio';
import * as path from 'path';
import { baseElectronTest, ElectronEnv, electronTest } from './electronTest';
import { test as pageTest } from './pageTest';
import { test as pageTest } from '../page/pageTest';
const config: folio.Config = {
testDir: path.join(__dirname, '..'),

View File

@ -15,17 +15,14 @@
* limitations under the License.
*/
import { test as it, expect } from './config/pageTest';
import { browserTest } from './config/browserTest';
import { contextTest as it, browserTest, expect } from './config/browserTest';
import { attachFrame } from './config/utils';
it('should think that it is focused by default', async ({page}) => {
expect(await page.evaluate('document.hasFocus()')).toBe(true);
});
it('should think that all pages are focused', async ({page, isElectron}) => {
it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');
it('should think that all pages are focused', async ({page}) => {
const page2 = await page.context().newPage();
expect(await page.evaluate('document.hasFocus()')).toBe(true);
expect(await page2.evaluate('document.hasFocus()')).toBe(true);
@ -42,9 +39,7 @@ it('should focus popups by default', async ({page, server}) => {
expect(await page.evaluate('document.hasFocus()')).toBe(true);
});
it('should provide target for keyboard events', async ({page, server, isElectron}) => {
it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');
it('should provide target for keyboard events', async ({page, server}) => {
const page2 = await page.context().newPage();
await Promise.all([
page.goto(server.PREFIX + '/input/textarea.html'),
@ -67,9 +62,7 @@ it('should provide target for keyboard events', async ({page, server, isElectron
expect(results).toEqual([text, text2]);
});
it('should not affect mouse event target page', async ({page, server, isElectron}) => {
it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');
it('should not affect mouse event target page', async ({page, server}) => {
const page2 = await page.context().newPage();
function clickCounter() {
document.onclick = () => window['clickCount'] = (window['clickCount'] || 0) + 1;
@ -91,9 +84,7 @@ it('should not affect mouse event target page', async ({page, server, isElectron
expect(counters).toEqual([1,1]);
});
it('should change document.activeElement', async ({page, server, isElectron}) => {
it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');
it('should change document.activeElement', async ({page, server}) => {
const page2 = await page.context().newPage();
await Promise.all([
page.goto(server.PREFIX + '/input/textarea.html'),
@ -110,10 +101,8 @@ it('should change document.activeElement', async ({page, server, isElectron}) =>
expect(active).toEqual(['INPUT', 'TEXTAREA']);
});
it('should not affect screenshots', async ({page, server, browserName, headful, isElectron, isAndroid}) => {
it('should not affect screenshots', async ({page, server, browserName, headful}) => {
it.skip(browserName === 'firefox' && headful);
it.skip(isAndroid);
it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');
// Firefox headful produces a different image.
const page2 = await page.context().newPage();

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { browserTest } from '../config/browserTest';
it.skip(({ isAndroid }) => isAndroid);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page, server }) => {
await page.goto(server.PREFIX + '/input/button.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should work', async ({ page, server }) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should have a nice preview', async ({ page, server }) => {
await page.goto(`${server.PREFIX}/dom.html`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page, server}) => {
await page.setContent('<html><body><div class="tweet"><div class="like">100</div><div class="retweets">10</div></div></body></html>');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should hover', async ({ page, server }) => {
await page.goto(server.PREFIX + '/input/scrollable.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should work', async ({ page, server }) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page }) => {
await page.setContent(`<input type='text' />`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should query existing element', async ({page, server}) => {
await page.goto(server.PREFIX + '/playground.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { verifyViewport } from '../config/utils';
import path from 'path';
import fs from 'fs';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page, server, isAndroid }) => {
it.fixme(isAndroid);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should select textarea', async ({ page, server, isFirefox }) => {
await page.goto(server.PREFIX + '/input/textarea.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page }) => {
await page.setContent(`<input type='text' />`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
async function giveItAChanceToResolve(page) {
for (let i = 0; i < 5; i++)

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work with css selector', async ({page, server}) => {
await page.setContent('<div>hello</div><div>beautiful</div><div>world!</div>');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work with css selector', async ({page, server}) => {
await page.setContent('<section id="testAttribute">43543</section>');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame, detachFrame } from '../config/utils';
import type { Frame } from '../../src/client/frame';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should navigate subframes', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame, detachFrame } from '../config/utils';
import type { Frame } from '../../index';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { globToRegex } from '../../lib/client/clientHelper';
import vm from 'vm';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test, expect } from '../config/pageTest';
import { test, expect } from './pageTest';
test('should work', async ({page}) => {
const aHandle = await page.evaluateHandle(() => document.body);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work with function', async ({page}) => {
const windowHandle = await page.evaluateHandle(() => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page}) => {
const aHandle = await page.evaluateHandle(() => ({foo: 'bar'}));

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import type { ElementHandle } from '../../index';
it('should work', async ({page}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work for primitives', async ({page}) => {
const numberHandle = await page.evaluateHandle(() => 2);

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it.fixme(({ isAndroid }) => isAndroid, 'Post data does not work');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page, isFirefox, isChromium }) => {
await page.setContent(`

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should evaluate before anything else on the page', async ({ page, server }) => {
await page.addInitScript(function() {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import path from 'path';
it('should throw an error if no options are provided', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import path from 'path';
it('should throw an error if no options are provided', async ({page, server}) => {

View File

@ -16,7 +16,7 @@
*/
import { TestServer } from '../../utils/testserver';
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
function initServer(server: TestServer): string[] {
const messages = [];

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it } from '../config/pageTest';
import { test as it } from './pageTest';
it('clicking on links which do not commit navigation', async ({page, server, httpsServer}) => {
await page.goto(server.EMPTY_PAGE);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should reject all promises when page is closed', async ({page}) => {
let error = null;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should check the box', async ({page}) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
declare const renderComponent;
declare const e;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it } from '../config/pageTest';
import { test as it } from './pageTest';
it('should not hit scroll bar', async ({page, isAndroid, isWebKit, platform}) => {
it.fixme(isWebKit && platform === 'darwin');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should avoid side effects after timeout', async ({page, server, mode}) => {
it.skip(mode !== 'default');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should timeout waiting for display:none to be gone', async ({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should fail when element jumps during hit testing', async ({page, mode}) => {
it.skip(mode !== 'default');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should timeout waiting for stable position', async ({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
async function giveItAChanceToClick(page) {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should close page with active dialog', async ({page}) => {
await page.setContent(`<button onclick="setTimeout(() => alert(1))">alert</button>`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should fire', async ({page, server}) => {
page.on('dialog', dialog => {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should dispatch click event', async ({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');

View File

@ -15,7 +15,7 @@
*/
import type { ElementHandle } from '../../index';
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it.describe('Drag and drop', () => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it.skip(({ isAndroid }) => isAndroid);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page}) => {
const windowHandle = await page.evaluateHandle(() => window);

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test, expect } from '../config/pageTest';
import { test, expect } from './pageTest';
test.describe('non-stalling evaluate', () => {
test.skip(({mode}) => mode !== 'default');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({ page }) => {
const result = await page.evaluate(() => 7 * 3);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import util from 'util';
it('should work', async ({page}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import * as os from 'os';
function crash({ page, toImpl, browserName, platform, mode }: any) {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('Page.Events.Request', async ({page, server}) => {
const requests = [];

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should fire', async ({page, server, isWebKit}) => {
const [error] = await Promise.all([

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page}) => {
const [popup] = await Promise.all([

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should fire for navigation requests', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
import type { ElementHandle } from '../../index';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
async function giveItAChanceToFill(page) {
for (let i = 0; i < 5; i++)

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async function({page, browserName}) {
it.skip(browserName === 'firefox');

View File

@ -17,7 +17,7 @@
import url from 'url';
import os from 'os';
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { expectedSSLError } from '../config/utils';
it('should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import url from 'url';
it('page.goBack should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it.skip(({ isAndroid }) => isAndroid);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
function dimensions() {
const rect = document.querySelector('textarea').getBoundingClientRect();

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it } from '../config/pageTest';
import { test as it } from './pageTest';
it('should work with _blank target', async ({page, server}) => {
server.setRoute('/empty.html', (req, res) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import type { Frame } from '../../index';
import { TestServer } from '../../utils/testserver';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
it('should work for main frame navigation request', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import fs from 'fs';
it('should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page, server}) => {
await page.route('**/*', route => route.continue());

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import fs from 'fs';
it('should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should intercept', async ({page, server}) => {
let intercepted = false;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { verifyViewport } from '../config/utils';
import path from 'path';
import fs from 'fs';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
async function giveItAChanceToResolve(page) {
for (let i = 0; i < 5; i++)

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
const expectedOutput = '<html><head></head><body><div>hello</div></body></html>';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page, server}) => {
await page.setExtraHTTPHeaders({

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import path from 'path';
import fs from 'fs';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should timeout', async ({page}) => {
const startTime = Date.now();

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import type { Route } from '../../index';
it('should pick up ongoing navigation', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import type { Frame } from '../../index';
import { expectedSSLError } from '../config/utils';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import vm from 'vm';
it('should work', async ({page, server}) => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page, server}) => {
await page.goto(server.EMPTY_PAGE);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame, detachFrame } from '../config/utils';
async function giveItTimeToLog(frame) {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame, detachFrame } from '../config/utils';
const addElement = tag => document.body.appendChild(document.createElement(tag));

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page, server}) => {
await page.goto(server.EMPTY_PAGE);

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { baseTest } from './baseTest';
import { baseTest } from '../config/baseTest';
import type { Page } from '../../index';
export { expect } from 'folio';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should throw for non-string selector', async ({page}) => {
const error = await page.$(null).catch(e => e);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work with large DOM', async ({page, server}) => {
await page.evaluate(() => {

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work for open shadow roots', async ({page, server}) => {
await page.goto(server.PREFIX + '/deep-shadow.html');

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
it('should work', async ({page}) => {
await page.setContent(`<div>yo</div><div>ya</div><div>\nye </div>`);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { test as it, expect } from '../config/pageTest';
import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
import type { ConsoleMessage } from '../../index';

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { test as it, expect } from './config/pageTest';
import { contextTest as it, expect } from './config/browserTest';
import { attachFrame } from './config/utils';
async function checkSlowMo(toImpl, page, task) {

Some files were not shown because too many files have changed in this diff Show More