Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: roll folio to 0.3.11 (#4130)
Pavel Feldman381f49a0b874
diff --git a/package-lock.json b/package-lock.jsonindex 9cdbdb9f3a..aad2d0533e 100644--- a/package-lock.json+++ b/package-lock.json@@ -3650,9 +3650,9 @@}},"folio": {- "version": "0.3.9",- "resolved": "https://registry.npmjs.org/folio/-/folio-0.3.9.tgz",- "integrity": "sha512-BlqAAJxXDA1NviOAL16+QIAR339ULjseV2RJjfJvvY2nmxzeHeIiPpdH3noAmwlE6I9i/c/1lsuIAPfj7stPSw==",+ "version": "0.3.11",+ "resolved": "https://registry.npmjs.org/folio/-/folio-0.3.11.tgz",+ "integrity": "sha512-SEjwQYkCEYseYvNuL2CFSv83tIDkLruPvnRFN/eTdh+hD68N6aWFqcALWWcvt1mWrh9yhFXPmNEnr+79QaKADQ==","dev": true,"requires": {"@babel/code-frame": "^7.10.4",diff --git a/package.json b/package.jsonindex dfc3ad598e..610e69ead9 100644--- a/package.json+++ b/package.json@@ -68,7 +68,7 @@"electron": "^9.2.1","eslint": "^7.7.0","eslint-plugin-notice": "^0.9.10",- "folio": "=0.3.9",+ "folio": "=0.3.11","formidable": "^1.2.2","ncp": "^2.0.0","node-stream-zip": "^1.11.3",diff --git a/test/channels.spec.ts b/test/channels.spec.tsindex 9929b8be67..60ff074ec1 100644--- a/test/channels.spec.ts+++ b/test/channels.spec.ts@@ -19,7 +19,7 @@ import domain from 'domain';import { folio } from './fixtures';import type { ChromiumBrowser } from '..';-const fixtures = folio.extend<{ domain: any }>();+const fixtures = folio.extend<{}, { domain: any }>();fixtures.domain.init(async ({ }, run) => {const local = domain.create();local.run(() => { });diff --git a/test/chromium/tracing.spec.ts b/test/chromium/tracing.spec.tsindex 66eff19e13..b61f67aa71 100644--- a/test/chromium/tracing.spec.ts+++ b/test/chromium/tracing.spec.ts@@ -22,7 +22,7 @@ import type { ChromiumBrowser } from '../..';type TestState = {outputTraceFile: string;};-const fixtures = folio.extend<{}, TestState>();+const fixtures = folio.extend<TestState>();fixtures.outputTraceFile.init(async ({ testInfo }, run) => {await run(testInfo.outputPath(path.join(`trace.json`)));});diff --git a/test/downloads-path.spec.ts b/test/downloads-path.spec.tsindex 2cc352d4dd..1d64c42a3d 100644--- a/test/downloads-path.spec.ts+++ b/test/downloads-path.spec.ts@@ -23,7 +23,7 @@ type TestState = {downloadsBrowser: Browser;persistentDownloadsContext: BrowserContext;};-const fixtures = folio.extend<{}, TestState>();+const fixtures = folio.extend<TestState>();fixtures.downloadsBrowser.init(async ({ server, browserType, browserOptions, testInfo }, test) => {server.setRoute('/download', (req, res) => {diff --git a/test/electron/electron.fixture.ts b/test/electron/electron.fixture.tsindex bd331d6569..b4b5c49d28 100644--- a/test/electron/electron.fixture.ts+++ b/test/electron/electron.fixture.ts@@ -24,7 +24,7 @@ type TestState = {application: ElectronApplication;window: ElectronPage;};-const fixtures = base.extend<{}, TestState>();+const fixtures = base.extend<TestState>();fixtures.application.init(async ({ playwright }, run) => {const electronPath = path.join(__dirname, '..', '..', 'node_modules', '.bin', electronName);diff --git a/test/fixtures.spec.ts b/test/fixtures.spec.tsindex 5584790b9b..ab43ccb692 100644--- a/test/fixtures.spec.ts+++ b/test/fixtures.spec.ts@@ -23,7 +23,7 @@ type FixturesFixtures = {connectedRemoteServer: RemoteServer;stallingConnectedRemoteServer: RemoteServer;};-const fixtures = folio.extend<{}, FixturesFixtures>();+const fixtures = folio.extend<FixturesFixtures>();fixtures.connectedRemoteServer.init(async ({browserType, remoteServer, server}, run) => {const browser = await browserType.connect({ wsEndpoint: remoteServer.wsEndpoint() });diff --git a/test/fixtures.ts b/test/fixtures.tsindex b6e29300d0..86e8952b68 100644--- a/test/fixtures.ts+++ b/test/fixtures.ts@@ -51,7 +51,7 @@ type TestFixtures = {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);@@ -158,8 +158,6 @@ export const fit = folio.fit;export const test = folio.test;export const xit = folio.xit;export const describe = folio.describe;-export const fdescribe = folio.fdescribe;-export const xdescribe = folio.xdescribe;export const beforeEach = folio.beforeEach;export const afterEach = folio.afterEach;export const beforeAll = folio.beforeAll;diff --git a/test/http.fixtures.ts b/test/http.fixtures.tsindex 75b91b4acb..0d309cab23 100644--- a/test/http.fixtures.ts+++ b/test/http.fixtures.ts@@ -28,7 +28,7 @@ type HttpTestFixtures = {httpsServer: TestServer;};-const fixtures = base.extend<HttpWorkerFixtures, HttpTestFixtures>();+const fixtures = base.extend<HttpTestFixtures, HttpWorkerFixtures>();fixtures.httpService.init(async ({ testWorkerIndex }, test) => {const assetsPath = path.join(__dirname, 'assets');const cachedPath = path.join(__dirname, 'assets', 'cached');diff --git a/test/mouse.spec.ts b/test/mouse.spec.tsindex 69b40b519b..a240a7afeb 100644--- a/test/mouse.spec.ts+++ b/test/mouse.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { it, expect, xdescribe } from './fixtures';+import { it, expect, describe } from './fixtures';function dimensions() {const rect = document.querySelector('textarea').getBoundingClientRect();@@ -185,7 +185,7 @@ it('should work with mobile viewports and cross process navigations', (test, { bawait context.close();});-xdescribe('Drag and Drop', function() {+describe.skip('Drag and Drop', function() {it('should work', async ({server, page}) => {await page.goto(server.PREFIX + '/drag-n-drop.html');await page.hover('#source');diff --git a/test/playwright.fixtures.ts b/test/playwright.fixtures.tsindex 4c56dd3c2f..1138e226b6 100644--- a/test/playwright.fixtures.ts+++ b/test/playwright.fixtures.ts@@ -87,7 +87,7 @@ type PlaywrightTestFixtures = {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.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'));@@ -196,8 +196,6 @@ export const fit = folio.fit;export const xit = folio.xit;export const test = folio.test;export const describe = folio.describe;-export const fdescribe = folio.fdescribe;-export const xdescribe = folio.xdescribe;export const beforeEach = folio.beforeEach;export const afterEach = folio.afterEach;export const beforeAll = folio.beforeAll;diff --git a/test/remoteServer.fixture.ts b/test/remoteServer.fixture.tsindex ad48a39eb7..dc30be80d0 100644--- a/test/remoteServer.fixture.ts+++ b/test/remoteServer.fixture.ts@@ -24,7 +24,7 @@ type ServerFixtures = {remoteServer: RemoteServer;stallingRemoteServer: RemoteServer;};-const fixtures = base.extend<{}, ServerFixtures>();+const fixtures = base.extend<ServerFixtures>();fixtures.remoteServer.init(async ({ browserType, browserOptions }, run) => {const remoteServer = new RemoteServer();