@octostar/map-component 0.3.2 → 0.3.3
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 +14 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -61,6 +61,20 @@ This outputs:
|
|
|
61
61
|
- `dist/types/` - TypeScript declarations
|
|
62
62
|
- `dist/styles.css` - Component styles
|
|
63
63
|
|
|
64
|
+
## Testing
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pnpm test # Vitest: pure logic in Node, no map
|
|
68
|
+
pnpm test:e2e # Playwright: builds the demo app, drives the real map in Chromium
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The e2e suite (`e2e/`) runs in CI on every PR into `main`. It clicks, drags,
|
|
72
|
+
types and drops files through the component's UI, then checks what the map
|
|
73
|
+
holds: rendered features, feature state, source data and the panels. Install
|
|
74
|
+
the browser once with `pnpm exec playwright install chromium`.
|
|
75
|
+
|
|
76
|
+
How the suite works and how to add a test: [`e2e/README.md`](e2e/README.md).
|
|
77
|
+
|
|
64
78
|
## Usage (as a package)
|
|
65
79
|
|
|
66
80
|
```tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octostar/map-component",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "MapLibre-based map editor component",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@hookform/resolvers": "^3.10.0",
|
|
69
69
|
"@jridgewell/trace-mapping": "^0.3.25",
|
|
70
|
+
"@playwright/test": "1.62.1",
|
|
70
71
|
"@radix-ui/react-accordion": "^1.2.4",
|
|
71
72
|
"@radix-ui/react-alert-dialog": "^1.1.7",
|
|
72
73
|
"@radix-ui/react-aspect-ratio": "^1.1.3",
|
|
@@ -186,6 +187,7 @@
|
|
|
186
187
|
"typecheck": "tsc --noEmit",
|
|
187
188
|
"test": "vitest run",
|
|
188
189
|
"test:watch": "vitest",
|
|
190
|
+
"test:e2e": "pnpm run build && playwright test",
|
|
189
191
|
"db:push": "drizzle-kit push"
|
|
190
192
|
}
|
|
191
193
|
}
|