Releases: PaperStrike/wrightplay
v0.6.5
High Notes 🎤
Explore wrightplay-demo, a brand-new repository showcasing how to structure your project for effective web application testing with wrightplay!
Fixes
- Fix the hanging when the page was closed before the first run finishes in headed mode.
Details
- fix(runner): should not await close if closed by @PaperStrike in #25
Full Changelog: v0.6.4...v0.6.5
v0.6.4
Fixes
- Map the output source map
sources
field to absolute file URLs to better comply with Node.js. - For browser logs that failed to better serialize its arguments, print them as
[Incomplete] ${text}
instead of breaking the whole process.
Details
- refactor: better resource management by @PaperStrike in #23
- fix(runner): should allocate and dispose on runTests call by @PaperStrike in #24
Full Changelog: v0.6.2...v0.6.4
v0.6.2
Improvements
Enhanced watch mode (#17)
Previously, wrightplay utilized the esbuild stdin and relied on the watch API to monitor file changes. However, this approach presented issues, such as errors when test files were deleted and a lack of support for tracking the creation of new test files.
With this update, it starts to use a custom file watcher that not only resolves the problem of errors upon test file deletion but also extends its capabilities to encompass the creation, modification, and deletion of most test files and imported files. This enhancement ensures a more robust and seamless development experience, helping you effortlessly keep track of file changes while working on your projects.
Less pollution (#21)
In the past, wrightplay occupied the /stdin.js
path to inject test files. With this update, we have changed it to /__wrightplay__/stdin.js
, significantly reducing the likelihood of collisions.
Fixes
- Wrightplay will now throw and exit if no test file is found in non-watch mode. (#19)
- Corrected source-mapped stack traces for entry points that are not direct children of the current working directory. (#21)
- Discarded errors caused by auto-rerun navigations in watch mode. (#21)
- Added support for specifying a setup path without using a
./
prefix. (#22)
Details
- feat(runner): more flexible watch mode by @PaperStrike in #17
- refactor: split client and server types by @PaperStrike in #18
- fix(runner): static dir path & no test behavior by @PaperStrike in #19
- refactor: use ts-parser-service to resolve eslint paths by @PaperStrike in #20
- fix(runner): minimize wrightplay pollution by @PaperStrike in #21
- fix(runner): resolve the setup file path to import by @PaperStrike in #22
Full Changelog: v0.6.0...v0.6.2
v0.6.0
Breaking Changes
- wrightplay now requires Node.js 16+
NodeHandle
renamed toHostHandle
in #14buildMaxAge
option removed in #11
Improvements
Watch mode (#11)
Wrightplay now has the convenient ability to automatically re-execute your tests whenever there are changes in your test files. To enable this feature, simply specify the watch
option with one of the following commands:
npx wrightplay -w
# or
npx wrightplay --watch
This mode ensures that your test results remain up-to-date with minimal effort on your part.
TypeScript config files (#15)
In previous versions, using a TypeScript config file with wrightplay may throw a ERR_UNKNOWN_FILE_EXTENSION
error, unless you use a custom Node.js module loader like ts-node
. Starting from this version, the loader is no longer needed, as wrightplay seamlessly handles TypeScript configuration files without any hitches.
This is made possible through the internal use of jiti
, a super slim TypeScript runtime transpiler.
json
option in route.fulfill
(#13)
Now you can fulfill a route with arbitrary JSON data:
import { contextRoute } from 'wrightplay';
await contextRoute('hello', (r) => {
r.fulfill({ json: { foo: 'bar' } });
}, { times: 1 });
// { foo: 'bar' }
await (await fetch('hello')).json();
Core dependency updates
- playwright v1.24.0 -> v1.39.0
- esbuild v0.14.49 -> v0.19.5
Details
- feat(cli): auto infer typings by @PaperStrike in #9
- build: update deps & small adaptions by @PaperStrike in #10
- feat(runner): add watch mode by @PaperStrike in #11
- refactor(serializer): split serializers by @PaperStrike in #12
- feat(route): support route.fulfill json option by @PaperStrike in #13
- feat(handle): NodeHandle -> HostHandle by @PaperStrike in #14
- feat(cli): more default config search & TS support by @PaperStrike in #15
- fix(route): fix route.fulfill json option handling by @PaperStrike in #16
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- feat(handle): add browser context handle by @PaperStrike in #3
- feat(route): switch to context route by @PaperStrike in #4
- feat(route): support multiple more Request APIs by @PaperStrike in #5
- refactor(handle): auto dispose on finalize by @PaperStrike in #6
- feat(route): add request .frame and .serviceWorker by @PaperStrike in #7
Full Changelog: v0.4.1...v0.5.0
v0.4.1
What's Changed
- fix(route): mark handled status immediately by @PaperStrike in #2
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
- feat(route): support route.fallback by @PaperStrike in #1
New Contributors
- @PaperStrike made their first contribution in #1
Full Changelog: v0.3.4...v0.4.0
v0.3.4
- Await the true last console message transmission before closing the test page (3cbfd8f)
- Avoid duplicate test runs on History API navigations (615972b)
Full Changelog: v0.3.3...v0.3.4
v0.3.3
- Keep browser log listeners in headed mode (49ac915)
Full Changelog: v0.3.2...v0.3.3
v0.3.2
- Await the last route status resolve before processing next status switch (639e70e)
Full Changelog: v0.3.1...v0.3.2