@entifix/testing-e2e 0.1.0 → 0.1.1
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 +10 -10
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @entifix/testing-e2e
|
|
2
2
|
|
|
3
|
-
The e2e layer: one set of journeys, two profiles. Test-only
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
The e2e layer: one set of journeys, two profiles. Test-only. Depend on it as a
|
|
4
|
+
`devDependency`; Playwright, Vitest, msw and the datastore adapters are optional
|
|
5
|
+
peers, needed only by the entry points that use them.
|
|
6
6
|
|
|
7
7
|
## `E2E_PROFILE`
|
|
8
8
|
|
|
@@ -12,9 +12,9 @@ on it as a `devDependency`.
|
|
|
12
12
|
| `live` | everything, down to Mongo and RabbitMQ | yes | locally, on demand |
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
pnpm nx e2e
|
|
16
|
-
E2E_PROFILE=live
|
|
17
|
-
pnpm nx e2e
|
|
15
|
+
pnpm nx e2e my-app-e2e # mock, the default
|
|
16
|
+
E2E_PROFILE=live MY_SERVICE_URL=http://localhost:3000 \
|
|
17
|
+
pnpm nx e2e my-app-e2e
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`mock` is the default because the default has to run anywhere. `live` never
|
|
@@ -74,7 +74,7 @@ its transport needs.
|
|
|
74
74
|
// playwright.config.ts
|
|
75
75
|
export default defineEntifixE2eConfig({
|
|
76
76
|
configFile: __filename,
|
|
77
|
-
appDir: 'apps/
|
|
77
|
+
appDir: 'apps/my-app',
|
|
78
78
|
port: 3001,
|
|
79
79
|
});
|
|
80
80
|
|
|
@@ -103,7 +103,7 @@ is not something each suite has to remember.
|
|
|
103
103
|
|
|
104
104
|
```ts
|
|
105
105
|
const service = defineServiceE2e({
|
|
106
|
-
liveUrlEnvVar: '
|
|
106
|
+
liveUrlEnvVar: 'MY_SERVICE_URL',
|
|
107
107
|
startMock: () => serveTestService({ name, port: 0, router, appLayer: MockAppLayer }),
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -120,9 +120,9 @@ execute — what is absent is the infrastructure, not the service.
|
|
|
120
120
|
|
|
121
121
|
## Why the e2e targets set `NODE_OPTIONS`
|
|
122
122
|
|
|
123
|
-
`nx.json` gives every `e2e` target `NODE_OPTIONS=--conditions=@
|
|
123
|
+
`nx.json` gives every `e2e` target `NODE_OPTIONS=--conditions=@entifix/source`.
|
|
124
124
|
|
|
125
|
-
Vitest applies the workspace's `@
|
|
125
|
+
Vitest applies the workspace's `@entifix/source` condition through its own
|
|
126
126
|
`resolve.conditions` (see `vitest.shared.mts`), but Playwright resolves specs
|
|
127
127
|
with plain Node, which knows nothing about it — so a spec importing a workspace
|
|
128
128
|
package would resolve to its `dist/` and fail with `Cannot find module …/dist/index.js`
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/testing-e2e",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "End-to-end testing with one set of journeys and two profiles: mocked backends by default, real infrastructure on demand.",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -72,9 +73,9 @@
|
|
|
72
73
|
},
|
|
73
74
|
"dependencies": {
|
|
74
75
|
"@swc/helpers": "0.5.23",
|
|
75
|
-
"@entifix/
|
|
76
|
-
"@entifix/
|
|
77
|
-
"@entifix/
|
|
76
|
+
"@entifix/business": "0.1.1",
|
|
77
|
+
"@entifix/testing-unit": "0.1.1",
|
|
78
|
+
"@entifix/core": "0.1.1"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"@nx/devkit": ">=23 <24",
|
|
@@ -84,9 +85,9 @@
|
|
|
84
85
|
"effect": ">=3.22 <4",
|
|
85
86
|
"msw": "*",
|
|
86
87
|
"vitest": "*",
|
|
87
|
-
"@entifix/
|
|
88
|
-
"@entifix/
|
|
89
|
-
"@entifix/
|
|
88
|
+
"@entifix/redis": "0.1.1",
|
|
89
|
+
"@entifix/mongo": "0.1.1",
|
|
90
|
+
"@entifix/amqp": "0.1.1"
|
|
90
91
|
},
|
|
91
92
|
"peerDependenciesMeta": {
|
|
92
93
|
"@msw/playwright": {
|
|
@@ -124,8 +125,8 @@
|
|
|
124
125
|
"@nx/devkit": "23.0.1",
|
|
125
126
|
"@nx/playwright": "23.0.1",
|
|
126
127
|
"effect": "3.22.1",
|
|
127
|
-
"@entifix/amqp": "0.1.
|
|
128
|
-
"@entifix/mongo": "0.1.
|
|
129
|
-
"@entifix/redis": "0.1.
|
|
128
|
+
"@entifix/amqp": "0.1.1",
|
|
129
|
+
"@entifix/mongo": "0.1.1",
|
|
130
|
+
"@entifix/redis": "0.1.1"
|
|
130
131
|
}
|
|
131
132
|
}
|