Skip to content

Commit de21a94

Browse files
authored
test: roll to [email protected] (#6366)
1 parent 29164a6 commit de21a94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+178
-281
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"eslint-plugin-notice": "^0.9.10",
8888
"eslint-plugin-react-hooks": "^4.2.0",
8989
"file-loader": "^6.1.0",
90-
"folio": "=0.4.0-alpha4",
90+
"folio": "=0.4.0-alpha6",
9191
"formidable": "^1.2.2",
9292
"html-webpack-plugin": "^4.4.1",
9393
"ncp": "^2.0.0",

tests/browsercontext-device.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import { browserTest as it, expect } from './config/browserTest';
1919

2020
it.describe('device', () => {
21-
it.beforeEach(async ({browserName}) => {
22-
it.skip(browserName === 'firefox');
23-
});
21+
it.skip(({ browserName }) => browserName === 'firefox');
2422

2523
it('should work', async ({playwright, browser, server}) => {
2624
const iPhone = playwright.devices['iPhone 6'];

tests/browsercontext-proxy.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ import { browserTest as it, expect } from './config/browserTest';
1818
import type { Browser } from '../index';
1919

2020
let browser: Browser;
21-
it.beforeEach(async ({ browserType, browserOptions }) => {
22-
if (!browser)
23-
browser = await browserType.launch({ ...browserOptions, proxy: { server: 'per-context' } });
21+
it.beforeAll(async ({ browserType, browserOptions }) => {
22+
browser = await browserType.launch({ ...browserOptions, proxy: { server: 'per-context' } });
2423
});
2524
it.afterAll(async () => {
2625
await browser.close();

tests/browsercontext-viewport-mobile.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import { browserTest as it, expect } from './config/browserTest';
1919

2020
it.describe('mobile viewport', () => {
21-
it.beforeEach(async ({ browserName }) => {
22-
it.skip(browserName === 'firefox');
23-
});
21+
it.skip(({ browserName }) => browserName === 'firefox');
2422

2523
it('should support mobile emulation', async ({playwright, browser, server}) => {
2624
const iPhone = playwright.devices['iPhone 6'];

tests/browsercontext-viewport.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ import { test as it, expect } from './config/pageTest';
1919
import { browserTest } from './config/browserTest';
2020
import { verifyViewport } from './config/utils';
2121

22-
it.beforeEach(async ({ isElectron, isAndroid }) => {
23-
it.skip(isAndroid, 'Default viewport is null');
24-
it.skip(isElectron, 'Default viewport is null');
25-
});
22+
it.skip(({ isAndroid }) => isAndroid, 'Default viewport is null');
23+
it.skip(({ isElectron }) => isElectron, 'Default viewport is null');
2624

2725
it('should get the proper default viewport size', async ({page, server}) => {
2826
await verifyViewport(page, 1280, 720);

tests/browsertype-launch-server.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import { playwrightTest as it, expect } from './config/browserTest';
1919

2020
it.describe('launch server', () => {
21-
it.beforeEach(async ({ mode}) => {
22-
it.skip(mode !== 'default');
23-
});
21+
it.skip(({ mode}) => mode !== 'default');
2422

2523
it('should work', async ({browserType, browserOptions}) => {
2624
const browserServer = await browserType.launchServer(browserOptions);

tests/chromium/chromium.spec.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ import { playwrightTest } from '../config/browserTest';
2020
import http from 'http';
2121

2222
pageTest.describe('chromium', () => {
23-
pageTest.beforeEach(async ({ browserName, isElectron, isAndroid }) => {
24-
pageTest.skip(browserName !== 'chromium');
25-
pageTest.skip(isAndroid);
26-
pageTest.skip(isElectron);
27-
});
23+
pageTest.skip(({ browserName }) => browserName !== 'chromium');
24+
pageTest.skip(({ isAndroid }) => isAndroid);
25+
pageTest.skip(({ isElectron }) => isElectron);
2826

2927
pageTest('should create a worker from a service worker', async ({page, server}) => {
3028
const [worker] = await Promise.all([
@@ -85,9 +83,7 @@ pageTest.describe('chromium', () => {
8583
});
8684

8785
playwrightTest.describe('chromium', () => {
88-
playwrightTest.beforeEach(async ({ browserName }) => {
89-
playwrightTest.skip(browserName !== 'chromium');
90-
});
86+
playwrightTest.skip(({ browserName }) => browserName !== 'chromium');
9187

9288
playwrightTest('should close service worker together with the context', async ({browserType, browserOptions, server}) => {
9389
const browser = await browserType.launch(browserOptions);

tests/chromium/css-coverage.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
import { test as it, expect } from '../config/pageTest';
1818

1919
it.describe('CSS Coverage', () => {
20-
it.beforeEach(async ({ browserName }) => {
21-
it.skip(browserName !== 'chromium');
22-
});
20+
it.skip(({ browserName }) => browserName !== 'chromium');
2321

2422
it('should work', async function({page, server}) {
2523
await page.coverage.startCSSCoverage();

tests/chromium/js-coverage.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
import { test as it, expect } from '../config/pageTest';
1818

1919
it.describe('JS Coverage', () => {
20-
it.beforeEach(async ({ browserName, isElectron }) => {
21-
it.skip(browserName !== 'chromium');
22-
it.fixme(isElectron);
23-
});
20+
it.skip(({ browserName }) => browserName !== 'chromium');
21+
it.fixme(({ isElectron }) => isElectron);
2422

2523
it('should work', async function({page, server}) {
2624
await page.coverage.startJSCoverage();

0 commit comments

Comments
 (0)