test: roll to folio@0.4.0-alpha16 (#6656)

This commit is contained in:
Dmitry Gozman 2021-05-20 09:51:09 -07:00 committed by GitHub
parent ae35906fb5
commit 57f3a53a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 72 additions and 57 deletions

60
package-lock.json generated
View file

@ -20,17 +20,17 @@
"dev": true
},
"@babel/core": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.2.tgz",
"integrity": "sha512-OgC1mON+l4U4B4wiohJlQNUU3H73mpTyYY3j/c8U9dr9UagGGSm+WFpzjy/YLdoyjiG++c1kIDgxCo/mLwQJeQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz",
"integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.14.2",
"@babel/generator": "^7.14.3",
"@babel/helper-compilation-targets": "^7.13.16",
"@babel/helper-module-transforms": "^7.14.2",
"@babel/helpers": "^7.14.0",
"@babel/parser": "^7.14.2",
"@babel/parser": "^7.14.3",
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.14.2",
"@babel/types": "^7.14.2",
@ -66,9 +66,9 @@
}
},
"@babel/generator": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.2.tgz",
"integrity": "sha512-OnADYbKrffDVai5qcpkMxQ7caomHOoEwjkouqnN2QhydAjowFAZcsdecFIRUBdb+ZcruwYE4ythYmF1UBZU5xQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz",
"integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==",
"dev": true,
"requires": {
"@babel/types": "^7.14.2",
@ -114,16 +114,16 @@
}
},
"@babel/helper-create-class-features-plugin": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.2.tgz",
"integrity": "sha512-6YctwVsmlkchxfGUogvVrrhzyD3grFJyluj5JgDlQrwfMLJSt5tdAzFZfPf4H2Xoi5YLcQ6BxfJlaOBHuctyIw==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.3.tgz",
"integrity": "sha512-BnEfi5+6J2Lte9LeiL6TxLWdIlEv9Woacc1qXzXBgbikcOzMRM2Oya5XGg/f/ngotv1ej2A/b+3iJH8wbS1+lQ==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.12.13",
"@babel/helper-function-name": "^7.14.2",
"@babel/helper-member-expression-to-functions": "^7.13.12",
"@babel/helper-optimise-call-expression": "^7.12.13",
"@babel/helper-replace-supers": "^7.13.12",
"@babel/helper-replace-supers": "^7.14.3",
"@babel/helper-split-export-declaration": "^7.12.13"
}
},
@ -197,15 +197,15 @@
"dev": true
},
"@babel/helper-replace-supers": {
"version": "7.13.12",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz",
"integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.3.tgz",
"integrity": "sha512-Rlh8qEWZSTfdz+tgNV/N4gz1a0TMNwCUcENhMjHTHKp3LseYH5Jha0NSlyTQWMnjbYcwFt+bqAMqSLHVXkQ6UA==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.13.12",
"@babel/helper-optimise-call-expression": "^7.12.13",
"@babel/traverse": "^7.13.0",
"@babel/types": "^7.13.12"
"@babel/traverse": "^7.14.2",
"@babel/types": "^7.14.2"
}
},
"@babel/helper-simple-access": {
@ -270,9 +270,9 @@
}
},
"@babel/parser": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.2.tgz",
"integrity": "sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz",
"integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==",
"dev": true
},
"@babel/plugin-proposal-class-properties": {
@ -489,12 +489,12 @@
}
},
"@babel/plugin-transform-typescript": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz",
"integrity": "sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.3.tgz",
"integrity": "sha512-G5Bb5pY6tJRTC4ag1visSgiDoGgJ1u1fMUgmc2ijLkcIdzP83Q1qyZX4ggFQ/SkR+PNOatkaYC+nKcTlpsX4ag==",
"dev": true,
"requires": {
"@babel/helper-create-class-features-plugin": "^7.13.0",
"@babel/helper-create-class-features-plugin": "^7.14.3",
"@babel/helper-plugin-utils": "^7.13.0",
"@babel/plugin-syntax-typescript": "^7.12.13"
}
@ -2659,9 +2659,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.728",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.728.tgz",
"integrity": "sha512-SHv4ziXruBpb1Nz4aTuqEHBYi/9GNCJMYIJgDEXrp/2V01nFXMNFUTli5Z85f5ivSkioLilQatqBYFB44wNJrA==",
"version": "1.3.734",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.734.tgz",
"integrity": "sha512-iQF2mjPZ6zNNq45kbJ6MYZYCBNdv2JpGiJC/lVx4tGJWi9MNg73KkL9sWGN4X4I/CP2SBLWsT8nPADZZpAHIyw==",
"dev": true
},
"elliptic": {
@ -3483,9 +3483,9 @@
}
},
"folio": {
"version": "0.4.0-alpha14",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha14.tgz",
"integrity": "sha512-rQdHvFmczTtMFy2mlBRWMX6keC1Dd0bfJzF3NfU/H9JcYrU9zv6TuXiN662hC7Z+aky14JpIRNawwg+FVi1Bog==",
"version": "0.4.0-alpha16",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha16.tgz",
"integrity": "sha512-rxtXJXLkRnGpWc1tfrz2lI60/T5vb7hEoxmgaZQaq/D7LRrFOqyDWVWy3NKloWGHX+UKFWQERVYO6xRnSbrXnA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",

View file

@ -80,7 +80,7 @@
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.1.0",
"folio": "=0.4.0-alpha14",
"folio": "=0.4.0-alpha16",
"formidable": "^1.2.2",
"html-webpack-plugin": "^4.4.1",
"ncp": "^2.0.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -24,7 +24,7 @@ type AndroidWorkerFixtures = {
androidDevice: AndroidDevice;
};
export const androidFixtures: folio.Fixtures<PageTestFixtures & { __androidSetup: void }, AndroidWorkerFixtures & { androidContext: BrowserContext }, {}, CommonWorkerFixtures> = {
export const androidFixtures: folio.Fixtures<PageTestFixtures, AndroidWorkerFixtures & { androidContext: BrowserContext }, {}, CommonWorkerFixtures> = {
androidDevice: [ async ({ playwright }, run) => {
const device = (await playwright._android.devices())[0];
await device.shell('am force-stop org.chromium.webview_shell');
@ -51,13 +51,6 @@ export const androidFixtures: folio.Fixtures<PageTestFixtures & { __androidSetup
isAndroid: true,
isElectron: false,
__androidSetup: [ async ({ browserVersion }, run, testInfo) => {
testInfo.data.platform = 'Android';
testInfo.data.headful = true;
testInfo.data.browserVersion = browserVersion;
await run();
}, { auto: true } ],
androidContext: [ async ({ androidDevice }, run) => {
await run(await androidDevice.launchBrowser());
}, { scope: 'worker' } ],

View file

@ -132,7 +132,7 @@ it('should return bounding box with page scale', async ({ browser, server, brows
});
it('should not leak listeners during navigation of 20 pages', async ({contextFactory, server}) => {
it.slow('We open 20 pages here!');
it.slow(true, 'We open 20 pages here!');
const context = await contextFactory();
let warning = null;

View file

@ -19,7 +19,7 @@ import { playwrightTest as test, expect } from './config/browserTest';
import fs from 'fs';
import * as path from 'path';
test.slow('All connect tests are slow');
test.slow(true, 'All connect tests are slow');
test('should be able to reconnect to a browser', async ({browserType, startRemoteServer, server}) => {
const remoteServer = await startRemoteServer();

View file

@ -39,6 +39,15 @@ const config: folio.Config<CommonOptions & PlaywrightOptions> = {
projects: [],
};
const metadata = {
platform: 'Android',
headful: false,
browserName: 'chromium',
channel: undefined,
mode: 'default',
video: false,
};
config.projects.push({
name: 'android',
use: {
@ -47,6 +56,7 @@ config.projects.push({
browserName: 'chromium',
},
testDir: path.join(testDir, 'android'),
metadata,
});
config.projects.push({
@ -58,6 +68,7 @@ config.projects.push({
},
testDir: path.join(testDir, 'page'),
define: { test: pageTest, fixtures: androidFixtures },
metadata,
});
export default config;

View file

@ -123,15 +123,8 @@ const baseFixtures: folio.Fixtures<{ __baseSetup: void }, BaseOptions & BaseFixt
isWindows: [ process.platform === 'win32', { scope: 'worker' } ],
isMac: [ process.platform === 'darwin', { scope: 'worker' } ],
isLinux: [ process.platform === 'linux', { scope: 'worker' } ],
__baseSetup: [ async ({ browserName, headless, mode, video }, run, testInfo) => {
__baseSetup: [ async ({ browserName }, run, testInfo) => {
testInfo.snapshotPathSegment = browserName;
testInfo.data = { browserName };
if (!headless)
testInfo.data.headful = true;
if (mode !== 'default')
testInfo.data.mode = mode;
if (video)
testInfo.data.video = true;
await run();
}, { auto: true } ],
};

View file

@ -129,7 +129,6 @@ export const playwrightFixtures: folio.Fixtures<PlaywrightTestOptions & Playwrig
},
contextOptions: async ({ video, hasTouch, browserVersion }, run, testInfo) => {
testInfo.data.browserVersion = browserVersion;
const debugName = path.relative(testInfo.project.outputDir, testInfo.outputDir).replace(/[\/\\]/g, '-');
const contextOptions = {
recordVideo: video ? { dir: testInfo.outputPath('') } : undefined,

View file

@ -83,6 +83,14 @@ for (const browserName of browserNames) {
coverageName: browserName,
},
define: { test: pageTest, fixtures: pageFixtures },
metadata: {
platform: process.platform,
headful: !!headed,
browserName,
channel,
mode,
video: !!video,
},
});
}

View file

@ -39,6 +39,15 @@ const config: folio.Config<CommonOptions & PlaywrightOptions> = {
projects: [],
};
const metadata = {
platform: process.platform,
headful: true,
browserName: 'electron',
channel: undefined,
mode: 'default',
video: false,
};
config.projects.push({
name: 'electron',
use: {
@ -47,6 +56,7 @@ config.projects.push({
coverageName: 'electron',
},
testDir: path.join(testDir, 'electron'),
metadata,
});
config.projects.push({
@ -58,6 +68,7 @@ config.projects.push({
},
testDir: path.join(testDir, 'page'),
define: { test: pageTest, fixtures: electronFixtures },
metadata,
});
export default config;

View file

@ -171,7 +171,7 @@ it('should support offline option', async ({server, launchPersistent}) => {
});
it('should support acceptDownloads option', async ({server, launchPersistent}) => {
it.skip('Unskip once we support downloads in persistent context.');
it.skip(true, 'Unskip once we support downloads in persistent context.');
const {page} = await launchPersistent({acceptDownloads: true});
server.setRoute('/download', (req, res) => {

View file

@ -72,7 +72,7 @@ it.describe('Drag and drop', () => {
});
it.describe('iframe', () => {
it.fixme('implement dragging with iframes');
it.fixme(true, 'implement dragging with iframes');
it('should drag into an iframe', async ({server, page, browserName}) => {
await page.goto(server.PREFIX + '/drag-n-drop.html');

View file

@ -175,7 +175,7 @@ it('does launch without a port', async ({ browserType, browserOptions }) => {
});
it('should use proxy', async ({ browserType, browserOptions }) => {
it.fixme('Non-emulated user agent is used in proxy CONNECT');
it.fixme(true, 'Non-emulated user agent is used in proxy CONNECT');
let requestText = '';
// This is our proxy server

View file

@ -51,9 +51,9 @@ browserTest.describe('page screenshot', () => {
await context.close();
});
browserTest('should work with a mobile viewport and clip', async ({browser, server, browserName}) => {
browserTest('should work with a mobile viewport and clip', async ({browser, server, browserName, channel}) => {
browserTest.skip(browserName === 'firefox');
browserTest.skip(process.env.CRPATH); // Does not work in stable Chrome.
browserTest.skip(!!channel, 'Different result in stable/beta');
const context = await browser.newContext({viewport: { width: 320, height: 480 }, isMobile: true});
const page = await context.newPage();
@ -85,7 +85,7 @@ browserTest.describe('page screenshot', () => {
browserTest('should work with large size', async ({ browserName, headless, platform, contextFactory }) => {
browserTest.fixme(browserName === 'chromium' && !headless && platform === 'linux', 'Chromium has gpu problems on linux with large screnshots');
browserTest.slow('Large screenshot is slow');
browserTest.slow(true, 'Large screenshot is slow');
const context = await contextFactory();
const page = await context.newPage();

View file

@ -18,7 +18,7 @@
import { playwrightTest as test, expect } from './config/browserTest';
import { execSync } from 'child_process';
test.slow('All signal tests are slow');
test.slow();
test('should close the browser when the node process closes', async ({startRemoteServer, isWindows, server}) => {
const remoteServer = await startRemoteServer({ url: server.EMPTY_PAGE });