ohos-playwright 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/fixture.mjs +6 -1
  2. package/package.json +1 -1
package/dist/fixture.mjs CHANGED
@@ -56,7 +56,9 @@ export const test = base.extend({
56
56
  ? ([...pages].reverse().find((p) => p.url() === (info.launchUrl ?? 'about:blank')) ?? pages[pages.length - 1])
57
57
  : (pages.find((p) => p.url().startsWith('http://localhost')) ?? pages[0]);
58
58
  const ctxEmit = context.emit.bind(context);
59
- // Patch baseURL
59
+ // Patch baseURL — save and restore to prevent wrapper accumulation across
60
+ // tests that share the same page object.
61
+ const savedGoto = page['goto'];
60
62
  const baseURL = testInfo.project.use.baseURL;
61
63
  if (baseURL) {
62
64
  const root = baseURL.replace(/\/+$/, '');
@@ -151,6 +153,9 @@ export const test = base.extend({
151
153
  }
152
154
  catch { }
153
155
  }
156
+ // Restore goto to prevent wrapper accumulation across tests.
157
+ ;
158
+ page.goto = savedGoto;
154
159
  }
155
160
  },
156
161
  emulateDevice: async ({ page }, use) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohos-playwright",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Playwright adapter for OpenHarmony / ArkWeb via hdc + CDP",
5
5
  "license": "MIT",
6
6
  "author": "social4hyq",