2021-04-02 02:35:26 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) Microsoft Corporation.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2021-04-05 23:23:49 +03:00
|
|
|
import { newTestType } from 'folio';
|
2021-04-02 02:35:26 +03:00
|
|
|
import type { Page } from '../../index';
|
|
|
|
import type { ServerTestArgs } from './serverTest';
|
2021-04-05 23:23:49 +03:00
|
|
|
export { expect } from 'folio';
|
2021-04-02 02:35:26 +03:00
|
|
|
|
|
|
|
export type CommonTestArgs = {
|
|
|
|
mode: 'default' | 'driver' | 'service';
|
|
|
|
platform: 'win32' | 'darwin' | 'linux';
|
|
|
|
video: boolean;
|
2021-04-05 05:32:14 +03:00
|
|
|
headful: boolean;
|
2021-04-02 02:35:26 +03:00
|
|
|
|
|
|
|
playwright: typeof import('../../index');
|
|
|
|
toImpl: (rpcObject: any) => any;
|
2021-04-03 00:23:42 +03:00
|
|
|
browserName: 'chromium' | 'firefox' | 'webkit';
|
|
|
|
browserChannel: string | undefined;
|
2021-04-02 02:35:26 +03:00
|
|
|
|
|
|
|
isChromium: boolean;
|
|
|
|
isFirefox: boolean;
|
|
|
|
isWebKit: boolean;
|
|
|
|
isWindows: boolean;
|
|
|
|
isMac: boolean;
|
|
|
|
isLinux: boolean;
|
|
|
|
};
|
|
|
|
|
2021-04-03 07:07:45 +03:00
|
|
|
// Page test does not guarantee an isolated context, just a new page (because Android).
|
2021-04-02 02:35:26 +03:00
|
|
|
export type PageTestArgs = CommonTestArgs & {
|
|
|
|
page: Page;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const test = newTestType<PageTestArgs & ServerTestArgs>();
|