chore: roll folio to 0.3.11 (#4130)

This commit is contained in:
Pavel Feldman 2020-10-13 22:40:25 -07:00 committed by GitHub
parent 5a7685665a
commit 381f49a0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 15 additions and 19 deletions

6
package-lock.json generated
View file

@ -3650,9 +3650,9 @@
} }
}, },
"folio": { "folio": {
"version": "0.3.9", "version": "0.3.11",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.3.9.tgz", "resolved": "https://registry.npmjs.org/folio/-/folio-0.3.11.tgz",
"integrity": "sha512-BlqAAJxXDA1NviOAL16+QIAR339ULjseV2RJjfJvvY2nmxzeHeIiPpdH3noAmwlE6I9i/c/1lsuIAPfj7stPSw==", "integrity": "sha512-SEjwQYkCEYseYvNuL2CFSv83tIDkLruPvnRFN/eTdh+hD68N6aWFqcALWWcvt1mWrh9yhFXPmNEnr+79QaKADQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",

View file

@ -68,7 +68,7 @@
"electron": "^9.2.1", "electron": "^9.2.1",
"eslint": "^7.7.0", "eslint": "^7.7.0",
"eslint-plugin-notice": "^0.9.10", "eslint-plugin-notice": "^0.9.10",
"folio": "=0.3.9", "folio": "=0.3.11",
"formidable": "^1.2.2", "formidable": "^1.2.2",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"node-stream-zip": "^1.11.3", "node-stream-zip": "^1.11.3",

View file

@ -19,7 +19,7 @@ import domain from 'domain';
import { folio } from './fixtures'; import { folio } from './fixtures';
import type { ChromiumBrowser } from '..'; import type { ChromiumBrowser } from '..';
const fixtures = folio.extend<{ domain: any }>(); const fixtures = folio.extend<{}, { domain: any }>();
fixtures.domain.init(async ({ }, run) => { fixtures.domain.init(async ({ }, run) => {
const local = domain.create(); const local = domain.create();
local.run(() => { }); local.run(() => { });

View file

@ -22,7 +22,7 @@ import type { ChromiumBrowser } from '../..';
type TestState = { type TestState = {
outputTraceFile: string; outputTraceFile: string;
}; };
const fixtures = folio.extend<{}, TestState>(); const fixtures = folio.extend<TestState>();
fixtures.outputTraceFile.init(async ({ testInfo }, run) => { fixtures.outputTraceFile.init(async ({ testInfo }, run) => {
await run(testInfo.outputPath(path.join(`trace.json`))); await run(testInfo.outputPath(path.join(`trace.json`)));
}); });

View file

@ -23,7 +23,7 @@ type TestState = {
downloadsBrowser: Browser; downloadsBrowser: Browser;
persistentDownloadsContext: BrowserContext; persistentDownloadsContext: BrowserContext;
}; };
const fixtures = folio.extend<{}, TestState>(); const fixtures = folio.extend<TestState>();
fixtures.downloadsBrowser.init(async ({ server, browserType, browserOptions, testInfo }, test) => { fixtures.downloadsBrowser.init(async ({ server, browserType, browserOptions, testInfo }, test) => {
server.setRoute('/download', (req, res) => { server.setRoute('/download', (req, res) => {

View file

@ -24,7 +24,7 @@ type TestState = {
application: ElectronApplication; application: ElectronApplication;
window: ElectronPage; window: ElectronPage;
}; };
const fixtures = base.extend<{}, TestState>(); const fixtures = base.extend<TestState>();
fixtures.application.init(async ({ playwright }, run) => { fixtures.application.init(async ({ playwright }, run) => {
const electronPath = path.join(__dirname, '..', '..', 'node_modules', '.bin', electronName); const electronPath = path.join(__dirname, '..', '..', 'node_modules', '.bin', electronName);

View file

@ -23,7 +23,7 @@ type FixturesFixtures = {
connectedRemoteServer: RemoteServer; connectedRemoteServer: RemoteServer;
stallingConnectedRemoteServer: RemoteServer; stallingConnectedRemoteServer: RemoteServer;
}; };
const fixtures = folio.extend<{}, FixturesFixtures>(); const fixtures = folio.extend<FixturesFixtures>();
fixtures.connectedRemoteServer.init(async ({browserType, remoteServer, server}, run) => { fixtures.connectedRemoteServer.init(async ({browserType, remoteServer, server}, run) => {
const browser = await browserType.connect({ wsEndpoint: remoteServer.wsEndpoint() }); const browser = await browserType.connect({ wsEndpoint: remoteServer.wsEndpoint() });

View file

@ -51,7 +51,7 @@ type TestFixtures = {
launchPersistent: (options?: Parameters<BrowserType<Browser>['launchPersistentContext']>[1]) => Promise<{ context: BrowserContext, page: Page }>; launchPersistent: (options?: Parameters<BrowserType<Browser>['launchPersistentContext']>[1]) => Promise<{ context: BrowserContext, page: Page }>;
}; };
const fixtures = playwrightFolio.union(httpFolio).extend<WorkerFixtures, TestFixtures, WireParameters>(); const fixtures = playwrightFolio.union(httpFolio).extend<TestFixtures, WorkerFixtures, WireParameters>();
fixtures.wire.initParameter('Wire testing mode', !!process.env.PWWIRE); fixtures.wire.initParameter('Wire testing mode', !!process.env.PWWIRE);
@ -158,8 +158,6 @@ export const fit = folio.fit;
export const test = folio.test; export const test = folio.test;
export const xit = folio.xit; export const xit = folio.xit;
export const describe = folio.describe; export const describe = folio.describe;
export const fdescribe = folio.fdescribe;
export const xdescribe = folio.xdescribe;
export const beforeEach = folio.beforeEach; export const beforeEach = folio.beforeEach;
export const afterEach = folio.afterEach; export const afterEach = folio.afterEach;
export const beforeAll = folio.beforeAll; export const beforeAll = folio.beforeAll;

View file

@ -28,7 +28,7 @@ type HttpTestFixtures = {
httpsServer: TestServer; httpsServer: TestServer;
}; };
const fixtures = base.extend<HttpWorkerFixtures, HttpTestFixtures>(); const fixtures = base.extend<HttpTestFixtures, HttpWorkerFixtures>();
fixtures.httpService.init(async ({ testWorkerIndex }, test) => { fixtures.httpService.init(async ({ testWorkerIndex }, test) => {
const assetsPath = path.join(__dirname, 'assets'); const assetsPath = path.join(__dirname, 'assets');
const cachedPath = path.join(__dirname, 'assets', 'cached'); const cachedPath = path.join(__dirname, 'assets', 'cached');

View file

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { it, expect, xdescribe } from './fixtures'; import { it, expect, describe } from './fixtures';
function dimensions() { function dimensions() {
const rect = document.querySelector('textarea').getBoundingClientRect(); const rect = document.querySelector('textarea').getBoundingClientRect();
@ -185,7 +185,7 @@ it('should work with mobile viewports and cross process navigations', (test, { b
await context.close(); await context.close();
}); });
xdescribe('Drag and Drop', function() { describe.skip('Drag and Drop', function() {
it('should work', async ({server, page}) => { it('should work', async ({server, page}) => {
await page.goto(server.PREFIX + '/drag-n-drop.html'); await page.goto(server.PREFIX + '/drag-n-drop.html');
await page.hover('#source'); await page.hover('#source');

View file

@ -87,7 +87,7 @@ type PlaywrightTestFixtures = {
page: Page; page: Page;
}; };
const fixtures = baseFolio.extend<PlaywrightWorkerFixtures, PlaywrightTestFixtures, PlaywrightParameters>(); const fixtures = baseFolio.extend<PlaywrightTestFixtures, PlaywrightWorkerFixtures, PlaywrightParameters>();
fixtures.browserName.initParameter('Browser type name', (process.env.BROWSER || 'chromium') as 'chromium' | 'firefox' | 'webkit'); fixtures.browserName.initParameter('Browser type name', (process.env.BROWSER || 'chromium') as 'chromium' | 'firefox' | 'webkit');
fixtures.headful.initParameter('Whether to run tests headless or headful', process.env.HEADFUL ? true : false); fixtures.headful.initParameter('Whether to run tests headless or headful', process.env.HEADFUL ? true : false);
fixtures.platform.initParameter('Operating system', process.platform as ('win32' | 'linux' | 'darwin')); fixtures.platform.initParameter('Operating system', process.platform as ('win32' | 'linux' | 'darwin'));
@ -196,8 +196,6 @@ export const fit = folio.fit;
export const xit = folio.xit; export const xit = folio.xit;
export const test = folio.test; export const test = folio.test;
export const describe = folio.describe; export const describe = folio.describe;
export const fdescribe = folio.fdescribe;
export const xdescribe = folio.xdescribe;
export const beforeEach = folio.beforeEach; export const beforeEach = folio.beforeEach;
export const afterEach = folio.afterEach; export const afterEach = folio.afterEach;
export const beforeAll = folio.beforeAll; export const beforeAll = folio.beforeAll;

View file

@ -24,7 +24,7 @@ type ServerFixtures = {
remoteServer: RemoteServer; remoteServer: RemoteServer;
stallingRemoteServer: RemoteServer; stallingRemoteServer: RemoteServer;
}; };
const fixtures = base.extend<{}, ServerFixtures>(); const fixtures = base.extend<ServerFixtures>();
fixtures.remoteServer.init(async ({ browserType, browserOptions }, run) => { fixtures.remoteServer.init(async ({ browserType, browserOptions }, run) => {
const remoteServer = new RemoteServer(); const remoteServer = new RemoteServer();