revert unneeded
This commit is contained in:
parent
7c598a705a
commit
4d6a453c52
|
|
@ -243,10 +243,6 @@ Selectors can be used to install custom selector engines. See
|
|||
|
||||
This object can be used to launch or connect to WebKit, returning instances of [Browser].
|
||||
|
||||
## property: Playwright.mockingProxy
|
||||
* since: v1.51
|
||||
- type: <[MockingProxyFactory]>
|
||||
|
||||
## method: Playwright.close
|
||||
* since: v1.9
|
||||
* langs: java
|
||||
|
|
|
|||
|
|
@ -112,9 +112,3 @@ test('basic test', async ({ request }) => {
|
|||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
## property: Fixtures.server
|
||||
* since: v1.51
|
||||
- type: <[MockingProxy]>
|
||||
|
||||
Instance of [MockingProxy] that can be used to intercept network requests from your application server.
|
||||
|
|
|
|||
|
|
@ -94,11 +94,4 @@ export const Events = {
|
|||
Console: 'console',
|
||||
Window: 'window',
|
||||
},
|
||||
|
||||
MockingProxy: {
|
||||
Request: 'request',
|
||||
RequestFailed: 'requestfailed',
|
||||
Response: 'response',
|
||||
RequestFinished: 'requestfinished',
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -855,7 +855,7 @@ export class BindingCall extends ChannelOwner<channels.BindingCallChannel> {
|
|||
}
|
||||
}
|
||||
|
||||
export function trimUrl(param: any): string | undefined {
|
||||
function trimUrl(param: any): string | undefined {
|
||||
if (isRegExp(param))
|
||||
return `/${trimStringWithEllipsis(param.source, 50)}/${param.flags}`;
|
||||
if (isString(param))
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import { ChannelOwner } from './channelOwner';
|
|||
import { Electron } from './electron';
|
||||
import { APIRequest } from './fetch';
|
||||
import { Selectors, SelectorsOwner } from './selectors';
|
||||
import { MockingProxyFactory } from './mockingProxy';
|
||||
|
||||
export class Playwright extends ChannelOwner<channels.PlaywrightChannel> {
|
||||
readonly _android: Android;
|
||||
|
|
@ -35,13 +34,11 @@ export class Playwright extends ChannelOwner<channels.PlaywrightChannel> {
|
|||
readonly devices: any;
|
||||
selectors: Selectors;
|
||||
readonly request: APIRequest;
|
||||
readonly mockingProxy: MockingProxyFactory;
|
||||
readonly errors: { TimeoutError: typeof TimeoutError };
|
||||
|
||||
constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.PlaywrightInitializer) {
|
||||
super(parent, type, guid, initializer);
|
||||
this.request = new APIRequest(this);
|
||||
this.mockingProxy = new MockingProxyFactory(this._connection.localUtils());
|
||||
this.chromium = BrowserType.from(initializer.chromium);
|
||||
this.chromium._playwright = this;
|
||||
this.firefox = BrowserType.from(initializer.firefox);
|
||||
|
|
|
|||
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -20172,8 +20172,6 @@ export const chromium: BrowserType;
|
|||
*/
|
||||
export const firefox: BrowserType;
|
||||
|
||||
export const mockingProxy: MockingProxyFactory;
|
||||
|
||||
/**
|
||||
* Exposes API that can be used for the Web API testing.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
|
|||
if (serviceWorkers !== undefined)
|
||||
options.serviceWorkers = serviceWorkers;
|
||||
if (_mockingProxy)
|
||||
options.extraHTTPHeaders = { ...options.extraHTTPHeaders, 'x-pw-proxy-port': String(_mockingProxy.port()) };
|
||||
options.extraHTTPHeaders = { ...options.extraHTTPHeaders, 'x-playwright-proxy-port': String(_mockingProxy.port()) };
|
||||
await use({
|
||||
...contextOptions,
|
||||
...options,
|
||||
|
|
|
|||
|
|
@ -19,9 +19,8 @@ import type { StackFrame } from '@protocol/channels';
|
|||
import util from 'util';
|
||||
import path from 'path';
|
||||
import url from 'url';
|
||||
import net, { AddressInfo } from 'net';
|
||||
import { debug, mime, minimatch, parseStackTraceLine } from 'playwright-core/lib/utilsBundle';
|
||||
import { formatCallLog, ManualPromise } from 'playwright-core/lib/utils';
|
||||
import { formatCallLog } from 'playwright-core/lib/utils';
|
||||
import type { Location } from './../types/testReporter';
|
||||
import { calculateSha1, isRegExp, isString, sanitizeForFilePath, stringifyStackFrames } from 'playwright-core/lib/utils';
|
||||
import type { RawStack } from 'playwright-core/lib/utils';
|
||||
|
|
|
|||
6
packages/playwright/types/test.d.ts
vendored
6
packages/playwright/types/test.d.ts
vendored
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions, MockingProxy } from 'playwright-core';
|
||||
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions } from 'playwright-core';
|
||||
export * from 'playwright-core';
|
||||
|
||||
export type ReporterDescription = Readonly<
|
||||
|
|
@ -6913,10 +6913,6 @@ export interface PlaywrightTestArgs {
|
|||
*
|
||||
*/
|
||||
request: APIRequestContext;
|
||||
/**
|
||||
* Instance of [MockingProxy] that can be used to intercept network requests from your application server.
|
||||
*/
|
||||
server: MockingProxy;
|
||||
}
|
||||
|
||||
type ExcludeProps<A, B> = {
|
||||
|
|
|
|||
3
utils/generate_types/overrides-test.d.ts
vendored
3
utils/generate_types/overrides-test.d.ts
vendored
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions, MockingProxy } from 'playwright-core';
|
||||
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions } from 'playwright-core';
|
||||
export * from 'playwright-core';
|
||||
|
||||
export type ReporterDescription = Readonly<
|
||||
|
|
@ -288,7 +288,6 @@ export interface PlaywrightTestArgs {
|
|||
context: BrowserContext;
|
||||
page: Page;
|
||||
request: APIRequestContext;
|
||||
server: MockingProxy;
|
||||
}
|
||||
|
||||
type ExcludeProps<A, B> = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue