bloom-player 2.20.1 → 2.20.3-alpha.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 +14 -1
- package/dist/bloomPlayer.BAVrzru3.js +7995 -0
- package/dist/bloomplayer.htm +1 -1
- package/lib/narration.d.ts +1 -0
- package/lib/shared.es.js +1160 -1107
- package/lib/shared.es.js.map +1 -1
- package/package.json +1 -1
- package/src/shared/dragActivityRuntime.ts +126 -45
- package/src/shared/narration.ts +119 -76
- package/src/shared/scrolling.ts +9 -3
- package/dist/bloomPlayer.CzxSC7ao.js +0 -7995
package/README.md
CHANGED
|
@@ -173,7 +173,20 @@ To test Bloom Player on a book in the Bloom Editor, follow these steps:
|
|
|
173
173
|
|
|
174
174
|
### Running unit tests
|
|
175
175
|
|
|
176
|
-
To run unit tests use `pnpm test`. This will run all `*.test.ts
|
|
176
|
+
To run unit tests use `pnpm test`. This will run all `*.test.ts` under `src/`, which should be collocated with the thing being tested. These are vitest + jsdom tests.
|
|
177
|
+
|
|
178
|
+
### Running end-to-end (browser) tests
|
|
179
|
+
|
|
180
|
+
The vitest tests run in jsdom, which can't exercise real-browser behavior such as swiper page-turning geometry, the audio autoplay policy, or the actual built `dist/bloomplayer.htm` artifact that hosts embed. Those are covered by a Playwright suite under `e2e/`.
|
|
181
|
+
|
|
182
|
+
Because the e2e tests run against the built standalone bundle, build it first:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
pnpm build:standalone
|
|
186
|
+
pnpm test:e2e
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`pnpm test:e2e:build` does both in one step, and `pnpm test:e2e:ui` opens the Playwright UI. The suite serves `dist/` plus the hermetic `public/testBooks/` fixtures via `e2e/server.mjs`; no network access or external books are required. See [E2E-TESTING-PLAN.md](E2E-TESTING-PLAN.md) for the design and the list of specs.
|
|
177
190
|
|
|
178
191
|
|
|
179
192
|
### Version Info
|