Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: split playwright.fixtures into files (4) #3985

Merged
merged 1 commit into from
Sep 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 29 additions & 1 deletion 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 test/accessibility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

it('should work', async ({ page, isFirefox, isChromium }) => {
await page.setContent(`
Expand Down
2 changes: 1 addition & 1 deletion test/autowaiting-basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('should await navigation when clicking anchor', async ({page, server}) => {
const messages = [];
Expand Down
2 changes: 1 addition & 1 deletion test/autowaiting-no-hang.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it } from './playwright.fixtures';
import { it } from './fixtures';

it('clicking on links which do not commit navigation', async ({page, server, httpsServer}) => {
await page.goto(server.EMPTY_PAGE);
Expand Down
2 changes: 1 addition & 1 deletion test/browser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

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

import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should work', async ({context, page, server}) => {
await page.goto(server.EMPTY_PAGE);
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';
import { verifyViewport } from './utils';

it('should create new context', async function({browser}) {
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should clear cookies', async ({context, page, server}) => {
await page.goto(server.EMPTY_PAGE);
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

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 test/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 { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('should fail without credentials', (test, parameters) => {
test.fail(options.CHROMIUM(parameters) && !options.HEADLESS);
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-csp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';
import { attachFrame } from './utils';

it('should bypass CSP meta tag', async ({browser, server}) => {
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

describe('device', (suite, parameters) => {
suite.skip(options.FIREFOX(parameters));
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-expose-function.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('expose binding should work', async ({browser}) => {
const context = await browser.newContext();
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-locale.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

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 test/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 { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('should have url', async ({browser, server}) => {
const context = await browser.newContext();
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-route.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should intercept', async ({browser, server}) => {
const context = await browser.newContext();
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-timezone-id.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should work', async ({ browser }) => {
const func = () => new Date(1479579154987).toString();
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-user-agent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';
import { attachFrame } from './utils';

it('should work', async ({browser, server}) => {
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

describe('mobile viewport', (suite, parameters) => {
suite.skip(options.FIREFOX(parameters));
Expand Down
2 changes: 1 addition & 1 deletion test/browsercontext-viewport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';
import { verifyViewport } from './utils';

it('should get the proper default viewport size', async ({page, server}) => {
Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('browserType.executablePath should work', test => {
test.skip(Boolean(process.env.CRPATH || process.env.FFPATH || process.env.WKPATH));
Expand Down
2 changes: 1 addition & 1 deletion test/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 { options } from './playwright.fixtures';
import { options } from './fixtures';
import { serverFixtures } from './remoteServer.fixture';
const { it, expect, describe } = serverFixtures;

Expand Down
2 changes: 1 addition & 1 deletion test/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 { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

describe('lauch server', suite => {
suite.skip(options.WIRE);
Expand Down
2 changes: 1 addition & 1 deletion test/browsertype-launch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import path from 'path';
import { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

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

import url from 'url';
import { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('Web Assembly should work', (test, parameters) => {
test.fail(options.WEBKIT(parameters) && options.WIN(parameters));
Expand Down
2 changes: 1 addition & 1 deletion test/channels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import domain from 'domain';
import { options, fixtures as baseFixtures } from './playwright.fixtures';
import { options, fixtures as baseFixtures } from './fixtures';
import type { ChromiumBrowser } from '..';

type DomainFixtures = {
Expand Down
2 changes: 1 addition & 1 deletion test/check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should check the box', async ({page}) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
Expand Down
2 changes: 1 addition & 1 deletion test/chromium-css-coverage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

describe('oopif', (suite, parameters) => {
suite.skip(!options.CHROMIUM(parameters));
Expand Down
2 changes: 1 addition & 1 deletion test/chromium-js-coverage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { it, expect, describe, options } from './playwright.fixtures';
import { it, expect, describe, options } from './fixtures';

it('should be missing', (test, parameters) => {
test.skip(options.CHROMIUM(parameters));
Expand Down
2 changes: 1 addition & 1 deletion test/chromium/chromium.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect, describe, options } from '../playwright.fixtures';
import { it, expect, describe, options } from '../fixtures';
import type { ChromiumBrowserContext } from '../..';

describe('chromium', (suite, parameters) => {
Expand Down
2 changes: 1 addition & 1 deletion test/chromium/launcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect, options } from '../playwright.fixtures';
import { it, expect, options } from '../fixtures';

import path from 'path';
import type { ChromiumBrowser, ChromiumBrowserContext } from '../..';
Expand Down
2 changes: 1 addition & 1 deletion test/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 { options, fixtures as playwrightFixtures } from '../playwright.fixtures';
import { options, fixtures as playwrightFixtures } from '../fixtures';
const { it, expect, describe, overrideWorkerFixture } = playwrightFixtures;

overrideWorkerFixture('browser', async ({browserType, defaultBrowserOptions}, test) => {
Expand Down
2 changes: 1 addition & 1 deletion test/chromium/session.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect, describe, options } from '../playwright.fixtures';
import { it, expect, describe, options } from '../fixtures';
import type { ChromiumBrowserContext, ChromiumBrowser } from '../../types/types';

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

import { options, fixtures as playwrightFixtures } from '../playwright.fixtures';
import { options, fixtures as playwrightFixtures } from '../fixtures';
import fs from 'fs';
import path from 'path';
import type { ChromiumBrowser } from '../..';
Expand Down
2 changes: 1 addition & 1 deletion test/click-react.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

declare const renderComponent;
declare const e;
Expand Down
2 changes: 1 addition & 1 deletion test/click-timeout-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('should avoid side effects after timeout', (test, parameters) => {
test.skip(options.WIRE);
Expand Down
2 changes: 1 addition & 1 deletion test/click-timeout-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should timeout waiting for display:none to be gone', async ({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');
Expand Down
2 changes: 1 addition & 1 deletion test/click-timeout-3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect, options } from './playwright.fixtures';
import { it, expect, options } from './fixtures';

it('should fail when element jumps during hit testing', (test, parameters) => {
test.skip(options.WIRE);
Expand Down
2 changes: 1 addition & 1 deletion test/click-timeout-4.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { it, expect } from './playwright.fixtures';
import { it, expect } from './fixtures';

it('should timeout waiting for stable position', async ({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');
Expand Down