@ohos-ports/playwright-test 0.0.0-stage → 1.64.1-beta.0

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.
package/README.md CHANGED
@@ -1,3 +1,42 @@
1
- # Temporary Holding Version
1
+ # @ohos-ports/playwright-test
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ HarmonyOS (OpenHarmony) companion package for `@playwright/test@1.64.1`.
4
+
5
+ ## Why
6
+
7
+ Packages that depend on `@playwright/test` fail on OpenHarmony because the
8
+ upstream `playwright-core` throws `Unsupported platform: openharmony` at module
9
+ load time (in `defaultCacheDirectory` computation).
10
+
11
+ The kernel-level port [`@ohos-ports/playwright`](https://www.npmjs.com/package/@ohos-ports/playwright)
12
+ supports OpenHarmony (chromium.launch launches the system browser via
13
+ `launchViaHdc` and connects over CDP), but no `@ohos-ports/playwright-test`
14
+ mapping existed for the `@playwright/test` entry point.
15
+
16
+ ## What
17
+
18
+ This package is a thin wrapper mirroring upstream `@playwright/test@1.64.1`
19
+ (which is itself just `module.exports = require('playwright/test')`):
20
+
21
+ - `index.js` / `index.mjs` → re-export `@ohos-ports/playwright/test`
22
+ - `cli.js` → forwards to `@ohos-ports/playwright/lib/program`
23
+ - `index.d.ts` → re-exports the types of `@ohos-ports/playwright/test`
24
+
25
+ ## Usage
26
+
27
+ Replace `@playwright/test` with `@ohos-ports/playwright-test` (exact pin - the
28
+ port has no compatibility-evolution promise):
29
+
30
+ ```json
31
+ "dependencies": {
32
+ "@ohos-ports/playwright-test": "1.64.1-beta.0"
33
+ }
34
+ ```
35
+
36
+ ```js
37
+ const { chromium } = require('@ohos-ports/playwright-test');
38
+ ```
39
+
40
+ On OpenHarmony, `chromium.launch()` starts the system browser
41
+ (`com.huawei.hmos.browser` / `com.haitai.htbrowser`) and connects over CDP.
42
+ Browsers are provided by the system - do NOT run `npx playwright install`.
package/cli.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @ohos-ports/playwright-test - HarmonyOS port of @playwright/test@1.64.1
4
+ *
5
+ * CLI entry mirroring upstream @playwright/test@1.64.1/cli.js.
6
+ */
7
+
8
+ const { program } = require('@ohos-ports/playwright/lib/program');
9
+ program.parse(process.argv);
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @ohos-ports/playwright-test - HarmonyOS port of @playwright/test@1.64.1
3
+ *
4
+ * Types are provided by the underlying @ohos-ports/playwright port.
5
+ */
6
+
7
+ export * from '@ohos-ports/playwright/test';
8
+ export { default } from '@ohos-ports/playwright/test';
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @ohos-ports/playwright-test - HarmonyOS port of @playwright/test@1.64.1
3
+ *
4
+ * Mirrors upstream @playwright/test@1.64.1 (module.exports = require('playwright/test'))
5
+ * by forwarding to the HarmonyOS kernel-level port @ohos-ports/playwright.
6
+ */
7
+
8
+ module.exports = require('@ohos-ports/playwright/test');
package/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @ohos-ports/playwright-test - HarmonyOS port of @playwright/test@1.64.1
3
+ *
4
+ * ESM entry mirroring upstream @playwright/test@1.64.1/index.mjs.
5
+ */
6
+
7
+ import pw from '@ohos-ports/playwright/test';
8
+ export default pw;
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@ohos-ports/playwright-test",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.64.1-beta.0",
4
+ "description": "HarmonyOS (OpenHarmony) port of @playwright/test@1.64.1 - thin wrapper re-exporting @ohos-ports/playwright/test. Companion package for dependency-level migration of packages that depend on @playwright/test.",
5
+ "license": "Apache-2.0",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./index.d.ts",
10
+ "import": "./index.mjs",
11
+ "default": "./index.js",
12
+ "require": "./index.js"
13
+ },
14
+ "./cli": "./cli.js",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "bin": {
18
+ "playwright": "cli.js"
19
+ },
20
+ "dependencies": {
21
+ "@ohos-ports/playwright": "1.62.1-2-beta.3"
22
+ },
23
+ "engines": {
24
+ "node": ">=20"
25
+ },
26
+ "keywords": [
27
+ "playwright",
28
+ "test",
29
+ "ohos",
30
+ "openharmony",
31
+ "harmonyos",
32
+ "ohos-ports"
33
+ ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/ohos-ports/ohos-ports.git",
37
+ "directory": "ports/playwright-test/1.64.1"
38
+ }
39
+ }