Skip to content

Commit

Permalink
test: roll to folio@0.4.0-alpha3
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman committed Apr 28, 2021
1 parent 3c12602 commit c34a9b3
Show file tree
Hide file tree
Showing 102 changed files with 851 additions and 957 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.1.0",
"folio": "=0.3.21-alpha",
"folio": "=0.4.0-alpha4",
"formidable": "^1.2.2",
"html-webpack-plugin": "^4.4.1",
"ncp": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/android/browser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test, expect } from '../config/androidTest';
import { androidTest as test, expect } from '../config/androidTest';

test('androidDevice.model', async function({ androidDevice }) {
expect(androidDevice.model()).toBe('sdk_gphone_x86_arm');
Expand Down
4 changes: 2 additions & 2 deletions tests/android/device.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import fs from 'fs';
import { PNG } from 'pngjs';
import { test, expect } from '../config/androidTest';
import { androidTest as test, expect } from '../config/androidTest';

test('androidDevice.shell', async function({ androidDevice }) {
const output = await androidDevice.shell('echo 123');
Expand All @@ -28,7 +28,7 @@ test('androidDevice.open', async function({ androidDevice }) {
await socket.write(Buffer.from('321\n'));
const output = await new Promise(resolve => socket.on('data', resolve));
expect(output.toString()).toBe('321\n');
const closedPromise = new Promise(resolve => socket.on('close', resolve));
const closedPromise = new Promise<void>(resolve => socket.on('close', resolve));
await socket.close();
await closedPromise;
});
Expand Down
2 changes: 1 addition & 1 deletion tests/android/webview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test, expect } from '../config/androidTest';
import { androidTest as test, expect } from '../config/androidTest';

test('androidDevice.webView', async function({ androidDevice }) {
expect(androidDevice.webViews().length).toBe(0);
Expand Down
2 changes: 1 addition & 1 deletion tests/beforeunload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('should close browser with beforeunload page', async ({server, browserType, browserOptions }) => {
const browser = await browserType.launch(browserOptions);
Expand Down
2 changes: 1 addition & 1 deletion tests/browser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test, expect } from './config/browserTest';
import { browserTest as test, expect } from './config/browserTest';

test('should create new page', async function({browser}) {
const page1 = await browser.newPage();
Expand Down
5 changes: 2 additions & 3 deletions tests/browsercontext-add-cookies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { slowTest as playwrightTest } from './config/playwrightTest';
import { contextTest as it, slowPlaywrightTest, expect } from './config/browserTest';

it('should work', async ({context, page, server}) => {
await page.goto(server.EMPTY_PAGE);
Expand Down Expand Up @@ -158,7 +157,7 @@ it('should isolate send cookie header', async ({server, context, browser}) => {
}
});

playwrightTest('should isolate cookies between launches', async ({browserType, server, browserOptions}) => {
slowPlaywrightTest('should isolate cookies between launches', async ({browserType, server, browserOptions}) => {
const browser1 = await browserType.launch(browserOptions);
const context1 = await browser1.newContext();
await context1.addCookies([{url: server.EMPTY_PAGE, name: 'cookie-in-context-1', value: 'value', expires: Date.now() / 1000 + 10000}]);
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-add-init-script.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('should work with browser context scripts', async ({ context, server }) => {
await context.addInitScript(() => window['temp'] = 123);
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';
import { verifyViewport } from './config/utils';

it('should create new context', async function({browser}) {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-clearcookies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('should clear cookies', async ({context, page, server}) => {
await page.goto(server.EMPTY_PAGE);
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-cookies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('should return no cookies in pristine browser context', async ({context, page, server}) => {
expect(await context.cookies()).toEqual([]);
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-credentials.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should fail without credentials', async ({browser, server, browserName, headful}) => {
it.fail(browserName === 'chromium' && headful);
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-csp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';
import { attachFrame } from './config/utils';

it('should bypass CSP meta tag', async ({browser, server}) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-device.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it.describe('device', () => {
it.beforeEach(async ({browserName}) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-dsf.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should fetch lodpi assets', async ({ contextFactory, server}) => {
const context = await contextFactory({
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-expose-function.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('expose binding should work', async ({context}) => {
let bindingSource;
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-locale.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should affect accept-language header', async ({browser, server}) => {
const context = await browser.newContext({ locale: 'fr-CH' });
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-page-event.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should have url', async ({browser, server}) => {
const context = await browser.newContext();
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-proxy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';
import type { Browser } from '../index';

let browser: Browser;
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-route.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should intercept', async ({browser, server}) => {
const context = await browser.newContext();
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-set-extra-http-headers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should override extra headers from browser context', async ({browser, server}) => {
const context = await browser.newContext({
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-storage-state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';
import fs from 'fs';

it('should capture local storage', async ({ contextFactory }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-timezone-id.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it('should work', async ({ browser }) => {
const func = () => new Date(1479579154987).toString();
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-user-agent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';
import { attachFrame } from './config/utils';

it('should work', async ({browser, server}) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-viewport-mobile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/browserTest';
import { browserTest as it, expect } from './config/browserTest';

it.describe('mobile viewport', () => {
it.beforeEach(async ({ browserName }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsercontext-viewport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { test as it, expect } from './config/pageTest';
import { test as browserTest } from './config/browserTest';
import { browserTest } from './config/browserTest';
import { verifyViewport } from './config/utils';

it.beforeEach(async ({ isElectron, isAndroid }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/browsertype-basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import fs from 'fs';
import { test, expect } from './config/playwrightTest';
import { playwrightTest as test, expect } from './config/browserTest';

test('browserType.executablePath should work', async ({ browserType, browserChannel, browserOptions }) => {
test.skip(!!browserChannel, 'We skip browser download when testing a channel');
Expand Down
2 changes: 1 addition & 1 deletion tests/browsertype-connect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { slowTest as test, expect } from './config/playwrightTest';
import { slowPlaywrightTest as test, expect } from './config/browserTest';
import fs from 'fs';
import * as path from 'path';

Expand Down
4 changes: 2 additions & 2 deletions tests/browsertype-launch-server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, expect } from './config/playwrightTest';
import { playwrightTest as it, expect } from './config/browserTest';

it.describe('launch server', () => {
it.beforeEach(async ({ mode}) => {
Expand Down Expand Up @@ -45,7 +45,7 @@ it.describe('launch server', () => {
it('should fire "close" event during kill', async ({browserType, browserOptions}) => {
const order = [];
const browserServer = await browserType.launchServer(browserOptions);
const closedPromise = new Promise(f => browserServer.on('close', () => {
const closedPromise = new Promise<void>(f => browserServer.on('close', () => {
order.push('closed');
f();
}));
Expand Down
2 changes: 1 addition & 1 deletion tests/browsertype-launch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { test as it, slowTest, expect } from './config/playwrightTest';
import { playwrightTest as it, slowPlaywrightTest as slowTest, expect } from './config/browserTest';

it('should reject all promises when browser is closed', async ({browserType, browserOptions}) => {
const browser = await browserType.launch(browserOptions);
Expand Down
2 changes: 1 addition & 1 deletion tests/capabilities.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import os from 'os';
import url from 'url';
import { test as it, expect } from './config/contextTest';
import { contextTest as it, expect } from './config/browserTest';

it('Web Assembly should work', async function({page, server, browserName, platform}) {
it.fail(browserName === 'webkit' && platform === 'win32');
Expand Down
2 changes: 1 addition & 1 deletion tests/channels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import domain from 'domain';
import { test as it, expect } from './config/playwrightTest';
import { playwrightTest as it, expect } from './config/browserTest';

it('should scope context handles', async ({browserType, browserOptions, server}) => {
const browser = await browserType.launch(browserOptions);
Expand Down
2 changes: 1 addition & 1 deletion tests/chromium/chromium.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { test as pageTest, expect } from '../config/pageTest';
import { test as playwrightTest } from '../config/playwrightTest';
import { playwrightTest } from '../config/browserTest';
import http from 'http';

pageTest.describe('chromium', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/chromium/launcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test as it, expect } from '../config/playwrightTest';
import { playwrightTest as it, expect } from '../config/browserTest';

it.beforeEach(async ({ browserName }) => {
it.skip(browserName !== 'chromium');
Expand Down
2 changes: 1 addition & 1 deletion tests/chromium/oopif.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { test as it, expect } from '../config/playwrightTest';
import { playwrightTest as it, expect } from '../config/browserTest';
import type { Browser, Page } from '../../index';

it.describe('oopif', () => {
Expand Down
Loading

0 comments on commit c34a9b3

Please sign in to comment.