mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
ba5ba52e41
Drive-by: expose browser version in test report as well.
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
/**
|
|
* 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.
|
|
*/
|
|
|
|
import { newTestType } from 'folio';
|
|
import type { Page } from '../../index';
|
|
import type { ServerTestArgs } from './serverTest';
|
|
export { expect } from 'folio';
|
|
|
|
export type CommonTestArgs = {
|
|
mode: 'default' | 'driver' | 'service';
|
|
platform: 'win32' | 'darwin' | 'linux';
|
|
video: boolean;
|
|
headful: boolean;
|
|
|
|
playwright: typeof import('../../index');
|
|
toImpl: (rpcObject: any) => any;
|
|
browserName: 'chromium' | 'firefox' | 'webkit';
|
|
browserChannel: string | undefined;
|
|
|
|
isChromium: boolean;
|
|
isFirefox: boolean;
|
|
isWebKit: boolean;
|
|
isWindows: boolean;
|
|
isMac: boolean;
|
|
isLinux: boolean;
|
|
};
|
|
|
|
// Page test does not guarantee an isolated context, just a new page (because Android).
|
|
export type PageTestArgs = CommonTestArgs & {
|
|
browserVersion: string;
|
|
page: Page;
|
|
};
|
|
|
|
export const test = newTestType<PageTestArgs & ServerTestArgs>();
|