test: cleanup bad usages of pageTest (#6430)
This commit is contained in:
parent
67f98d00eb
commit
217cbe3e21
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-internal",
|
||||
"version": "1.11.0-next",
|
||||
"version": "1.12.0-next",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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>');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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, '..'),
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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 }) => {
|
||||
|
|
|
@ -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`);
|
||||
|
|
|
@ -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>');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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 }) => {
|
||||
|
|
|
@ -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' />`);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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' />`);
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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>');
|
||||
|
|
|
@ -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>');
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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'}));
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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(`
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>`);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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>`);
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
|
@ -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([
|
||||
|
|
|
@ -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([
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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>';
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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}) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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';
|
||||
|
|
@ -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);
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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>`);
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue