Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: make it possible to override Locator.dragTo(strict) (#11457)

Max Schmittb79daec8e04f
diff --git a/packages/playwright-core/src/client/locator.ts b/packages/playwright-core/src/client/locator.ts
index 232b56ca0a..8db1258e0b 100644
--- a/packages/playwright-core/src/client/locator.ts
+++ b/packages/playwright-core/src/client/locator.ts
@@ -81,8 +81,8 @@ export class Locator implements api.Locator {
async dragTo(target: Locator, options: channels.FrameDragAndDropOptions = {}) {
return this._frame.dragAndDrop(this._selector, target._selector, {
- ...options,
strict: true,
+ ...options,
});
}
diff --git a/packages/playwright-core/src/client/tracing.ts b/packages/playwright-core/src/client/tracing.ts
index 8d4f8bfb1c..5af502322d 100644
--- a/packages/playwright-core/src/client/tracing.ts
+++ b/packages/playwright-core/src/client/tracing.ts
@@ -38,17 +38,17 @@ export class Tracing implements api.Tracing {
}
async stopChunk(options: { path?: string } = {}) {
- await this._doStopChunk(this._context._channel, options.path);
+ await this._doStopChunk(options.path);
}
async stop(options: { path?: string } = {}) {
await this._context._wrapApiCall(async () => {
- await this._doStopChunk(this._context._channel, options.path);
+ await this._doStopChunk(options.path);
await this._context._channel.tracingStop();
});
}
- private async _doStopChunk(channel: channels.BrowserContextChannel, filePath: string | undefined) {
+ private async _doStopChunk(filePath: string | undefined) {
const isLocal = !this._context._connection.isRemote();
let mode: channels.BrowserContextTracingStopChunkParams['mode'] = 'doNotSave';
@@ -59,7 +59,7 @@ export class Tracing implements api.Tracing {
mode = 'compressTrace';
}
- const result = await channel.tracingStopChunk({ mode });
+ const result = await this._context._channel.tracingStopChunk({ mode });
if (!filePath) {
// Not interested in artifacts.
return;