mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: roll test-runner to 0.2.8 (#3748)
This commit is contained in:
parent
c5c3c75b03
commit
175fc52747
7
package-lock.json
generated
7
package-lock.json
generated
@ -1229,9 +1229,9 @@
|
||||
}
|
||||
},
|
||||
"@playwright/test-runner": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.2.5.tgz",
|
||||
"integrity": "sha512-gFQ+4Eiq4pY9menHX95r+QTOR2WMdsNebIbwoQhL2nJGjle9PwV1SiXl8P8+jJDOKmQ8+xW06+um1d5mSZTtRg==",
|
||||
"version": "0.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.2.8.tgz",
|
||||
"integrity": "sha512-FmUjAgVzVUhnHgC/j3hYZ5yOAhQXREYQtq0jbaV2oQk1b4KklDxo6lsf1nM2mb2SvBSv/gLbvbnpyciC4T/O7w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
@ -1242,6 +1242,7 @@
|
||||
"commander": "^6.1.0",
|
||||
"expect": "^26.4.2",
|
||||
"jpeg-js": "^0.4.2",
|
||||
"micromatch": "^4.0.2",
|
||||
"ms": "^2.1.2",
|
||||
"pirates": "^4.0.1",
|
||||
"pixelmatch": "^5.2.1",
|
||||
|
@ -54,7 +54,7 @@
|
||||
"@babel/core": "^7.11.4",
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
"@babel/preset-typescript": "^7.10.4",
|
||||
"@playwright/test-runner": "^0.2.5",
|
||||
"@playwright/test-runner": "^0.2.8",
|
||||
"@types/babel__core": "^7.1.9",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/extract-zip": "^1.6.2",
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
it('should work', async function({page}) {
|
||||
await page.setContent(`
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should await navigation when clicking anchor', async ({page, server}) => {
|
||||
const messages = [];
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('clicking on links which do not commit navigation', async ({page, server, httpsServer}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should create new page', async function({browser}) {
|
||||
const page1 = await browser.newPage();
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({context, page, server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should clear cookies', async ({context, page, server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should return no cookies in pristine browser context', async ({context, page, server}) => {
|
||||
expect(await context.cookies()).toEqual([]);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should fail without credentials', test => {
|
||||
test.fail(options.CHROMIUM && !options.HEADLESS);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import * as utils from './utils';
|
||||
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
describe('device', suite => {
|
||||
suite.skip(options.FIREFOX);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('expose binding should work', async ({browser}) => {
|
||||
const context = await browser.newContext();
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should affect accept-language header', async ({browser, server}) => {
|
||||
const context = await browser.newContext({ locale: 'fr-CH' });
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should have url', async ({browser, server}) => {
|
||||
const context = await browser.newContext();
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should intercept', async ({browser, server}) => {
|
||||
const context = await browser.newContext();
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ browser }) => {
|
||||
const func = () => new Date(1479579154987).toString();
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
describe('mobile viewport', suite => {
|
||||
suite.skip(options.FIREFOX);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('browserType.executablePath should work', test => {
|
||||
test.skip(Boolean(process.env.CRPATH || process.env.FFPATH || process.env.WKPATH));
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
import './remoteServer.fixture';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
describe('lauch server', suite => {
|
||||
suite.skip(options.WIRE);
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should reject all promises when browser is closed', async ({browserType, defaultBrowserOptions}) => {
|
||||
const browser = await browserType.launch(defaultBrowserOptions);
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import url from 'url';
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('Web Assembly should work', test => {
|
||||
test.fail(options.WEBKIT && WIN);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import type { ChromiumBrowser } from '..';
|
||||
|
||||
it('should work', async ({browser}) => {
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should check the box', async ({page}) => {
|
||||
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
|
||||
|
@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
describe('oopif', suite => {
|
||||
suite.skip(!options.CHROMIUM);
|
||||
|
@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
it('should be missing', test => {
|
||||
test.skip(options.CHROMIUM);
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, describe, options } from '../playwright.fixtures';
|
||||
import type { ChromiumBrowserContext } from '../..';
|
||||
|
||||
describe('chromium', suite => {
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, options } from '../playwright.fixtures';
|
||||
|
||||
import path from 'path';
|
||||
import utils from '../utils';
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { registerWorkerFixture } from '@playwright/test-runner';
|
||||
import { it, describe, registerWorkerFixture } from '@playwright/test-runner';
|
||||
|
||||
registerWorkerFixture('browser', async ({browserType, defaultBrowserOptions}, test) => {
|
||||
const browser = await browserType.launch({
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, describe, options } from '../playwright.fixtures';
|
||||
import type { ChromiumBrowserContext, ChromiumBrowser } from '../../types/types';
|
||||
|
||||
describe('session', suite => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { registerFixture } from '@playwright/test-runner';
|
||||
import { it, describe, registerFixture } from '@playwright/test-runner';
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
@ -23,25 +23,25 @@ import type { ChromiumBrowser } from '../..';
|
||||
|
||||
declare global {
|
||||
interface TestState {
|
||||
outputFile: string;
|
||||
outputTraceFile: string;
|
||||
}
|
||||
}
|
||||
|
||||
registerFixture('outputFile', async ({tmpDir}, test) => {
|
||||
const outputFile = path.join(tmpDir, `trace.json`);
|
||||
await test(outputFile);
|
||||
if (fs.existsSync(outputFile))
|
||||
fs.unlinkSync(outputFile);
|
||||
registerFixture('outputTraceFile', async ({tmpDir}, test) => {
|
||||
const outputTraceFile = path.join(tmpDir, `trace.json`);
|
||||
await test(outputTraceFile);
|
||||
if (fs.existsSync(outputTraceFile))
|
||||
fs.unlinkSync(outputTraceFile);
|
||||
});
|
||||
|
||||
describe('oopif', suite => {
|
||||
suite.skip(!options.CHROMIUM);
|
||||
}, () => {
|
||||
it('should output a trace', async ({browser, page, server, outputFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputFile});
|
||||
it('should output a trace', async ({browser, page, server, outputTraceFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputTraceFile});
|
||||
await page.goto(server.PREFIX + '/grid.html');
|
||||
await (browser as ChromiumBrowser).stopTracing();
|
||||
expect(fs.existsSync(outputFile)).toBe(true);
|
||||
expect(fs.existsSync(outputTraceFile)).toBe(true);
|
||||
});
|
||||
|
||||
it('should create directories as needed', async ({browser, page, server, tmpDir}) => {
|
||||
@ -52,29 +52,29 @@ describe('oopif', suite => {
|
||||
expect(fs.existsSync(filePath)).toBe(true);
|
||||
});
|
||||
|
||||
it('should run with custom categories if provided', async ({browser, page, outputFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {path: outputFile, categories: ['disabled-by-default-v8.cpu_profiler.hires']});
|
||||
it('should run with custom categories if provided', async ({browser, page, outputTraceFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {path: outputTraceFile, categories: ['disabled-by-default-v8.cpu_profiler.hires']});
|
||||
await (browser as ChromiumBrowser).stopTracing();
|
||||
|
||||
const traceJson = JSON.parse(fs.readFileSync(outputFile).toString());
|
||||
const traceJson = JSON.parse(fs.readFileSync(outputTraceFile).toString());
|
||||
expect(traceJson.metadata['trace-config']).toContain('disabled-by-default-v8.cpu_profiler.hires');
|
||||
});
|
||||
|
||||
it('should throw if tracing on two pages', async ({browser, page, outputFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {path: outputFile});
|
||||
it('should throw if tracing on two pages', async ({browser, page, outputTraceFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {path: outputTraceFile});
|
||||
const newPage = await browser.newPage();
|
||||
let error = null;
|
||||
await (browser as ChromiumBrowser).startTracing(newPage, {path: outputFile}).catch(e => error = e);
|
||||
await (browser as ChromiumBrowser).startTracing(newPage, {path: outputTraceFile}).catch(e => error = e);
|
||||
await newPage.close();
|
||||
expect(error).toBeTruthy();
|
||||
await (browser as ChromiumBrowser).stopTracing();
|
||||
});
|
||||
|
||||
it('should return a buffer', async ({browser, page, server, outputFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputFile});
|
||||
it('should return a buffer', async ({browser, page, server, outputTraceFile}) => {
|
||||
await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputTraceFile});
|
||||
await page.goto(server.PREFIX + '/grid.html');
|
||||
const trace = await (browser as ChromiumBrowser).stopTracing();
|
||||
const buf = fs.readFileSync(outputFile);
|
||||
const buf = fs.readFileSync(outputTraceFile);
|
||||
expect(trace.toString()).toEqual(buf.toString());
|
||||
});
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
declare const renderComponent;
|
||||
declare const e;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should avoid side effects after timeout', test => {
|
||||
test.skip(options.WIRE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
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 { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should fail when element jumps during hit testing', test => {
|
||||
test.skip(options.WIRE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
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 { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
async function giveItAChanceToClick(page) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import fs from 'fs';
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import fs from 'fs';
|
||||
import utils from './utils';
|
||||
const { removeUserDataDir, makeUserDataDir } = utils;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should fire', async ({page, server}) => {
|
||||
page.on('dialog', dialog => {
|
||||
|
@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,13 +15,13 @@
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, beforeEach } from '@playwright/test-runner';
|
||||
import './remoteServer.fixture';
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import util from 'util';
|
||||
|
||||
|
||||
beforeEach(async ({server}) => {
|
||||
server.setRoute('/download', (req, res) => {
|
||||
res.setHeader('Content-Type', 'application/octet-stream');
|
||||
|
@ -14,11 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { it, registerFixture } from '@playwright/test-runner';
|
||||
import './playwright.fixtures';
|
||||
|
||||
import { registerFixture } from '@playwright/test-runner';
|
||||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, describe, options } from '../playwright.fixtures';
|
||||
import './electron.fixture';
|
||||
|
||||
import path from 'path';
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, describe, options } from '../playwright.fixtures';
|
||||
import './electron.fixture';
|
||||
|
||||
describe('electron window', suite => {
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
|
||||
it('should work', test => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page, server }) => {
|
||||
await page.goto(server.PREFIX + '/input/button.html');
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should have a nice preview', async ({ page, server }) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
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 './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should hover', async ({ page, server }) => {
|
||||
await page.goto(server.PREFIX + '/input/scrollable.html');
|
||||
|
@ -15,9 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page, server }) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page }) => {
|
||||
await page.setContent(`<input type='text' />`);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should query existing element', async ({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/playground.html');
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
import {PNG} from 'pngjs';
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page, server }) => {
|
||||
await page.goto(server.PREFIX + '/offscreenbuttons.html');
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should select textarea', async ({ page, server }) => {
|
||||
await page.goto(server.PREFIX + '/input/textarea.html');
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page }) => {
|
||||
await page.setContent(`<input type='text' />`);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
async function giveItAChanceToResolve(page) {
|
||||
for (let i = 0; i < 5; i++)
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should think that it is focused by default', async ({page}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
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 './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work with css selector', async ({page, server}) => {
|
||||
await page.setContent('<section id="testAttribute">43543</section>');
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from '../playwright.fixtures';
|
||||
import { it, options } from '../playwright.fixtures';
|
||||
|
||||
it('should pass firefox user preferences', test => {
|
||||
test.skip(!options.FIREFOX);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
import './remoteServer.fixture';
|
||||
|
||||
import { execSync } from 'child_process';
|
||||
|
@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should work', test => {
|
||||
test.skip(options.FIREFOX);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should handle nested frames', async ({page, server}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({page, server, context}) => {
|
||||
await context.grantPermissions(['geolocation']);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
import utils from './utils';
|
||||
const { makeUserDataDir, removeUserDataDir } = utils;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({browser, httpsServer}) => {
|
||||
let error = null;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
import { globToRegex } from '../lib/client/clientHelper';
|
||||
import vm from 'vm';
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({page}) => {
|
||||
const aHandle = await page.evaluateHandle(() => document.body);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work with function', async ({page}) => {
|
||||
const windowHandle = await page.evaluateHandle(() => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({page}) => {
|
||||
const aHandle = await page.evaluateHandle(() => ({foo: 'bar'}));
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({page}) => {
|
||||
const aHandle = await page.evaluateHandle(() => ({
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should work for primitives', async ({page}) => {
|
||||
const numberHandle = await page.evaluateHandle(() => 2);
|
||||
|
@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { options } from './playwright.fixtures';
|
||||
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should type into a textarea', async ({page}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import path from 'path';
|
||||
import utils from './utils';
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should log', async ({browserType, defaultBrowserOptions}) => {
|
||||
const log = [];
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, xdescribe, options } from './playwright.fixtures';
|
||||
|
||||
function dimensions() {
|
||||
const rect = document.querySelector('textarea').getBoundingClientRect();
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work with _blank target', async ({page, server}) => {
|
||||
server.setRoute('/empty.html', (req, res) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should work for main frame navigation request', async ({page, server}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import path from 'path';
|
||||
|
||||
it('should evaluate before anything else on the page', async ({ page, server }) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
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 './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
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 { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should reject all promises when page is closed', async ({context}) => {
|
||||
const newPage = await context.newPage();
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import utils from './utils';
|
||||
|
||||
it('should emulate type', async ({page, server}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({page, server}) => {
|
||||
const windowHandle = await page.evaluateHandle(() => window);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should work', async ({ page, server }) => {
|
||||
const result = await page.evaluate(() => 7 * 3);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './playwright.fixtures';
|
||||
import { it } from './playwright.fixtures';
|
||||
import util from 'util';
|
||||
|
||||
it('should work', async ({page, server}) => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, describe, options } from './playwright.fixtures';
|
||||
|
||||
function crash(pageImpl, browserName) {
|
||||
if (browserName === 'chromium')
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('Page.Events.Request', async ({page, server}) => {
|
||||
const requests = [];
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { options } from './playwright.fixtures';
|
||||
import { it, options } from './playwright.fixtures';
|
||||
|
||||
it('should fire', async ({page, server}) => {
|
||||
const [error] = await Promise.all([
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user