Skip to content

Releases: PaperStrike/wrightplay

v0.6.5

31 Oct 10:28
Compare
Choose a tag to compare

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

Full Changelog: v0.6.4...v0.6.5

v0.6.4

29 Oct 12:36
94b0aba
Compare
Choose a tag to compare

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

Full Changelog: v0.6.2...v0.6.4

v0.6.2

27 Oct 16:00
bc343db
Compare
Choose a tag to compare

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

Full Changelog: v0.6.0...v0.6.2

v0.6.0

22 Oct 15:18
288c8e5
Compare
Choose a tag to compare

Breaking Changes

  • wrightplay now requires Node.js 16+
  • NodeHandle renamed to HostHandle in #14
  • buildMaxAge 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

Full Changelog: v0.5.0...v0.6.0

v0.5.0

22 Jul 20:28
d969256
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.1...v0.5.0

v0.4.1

14 Jul 08:24
a36b0ec
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.0...v0.4.1

v0.4.0

14 Jul 07:53
f487525
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.4...v0.4.0

v0.3.4

13 Jul 19:32
Compare
Choose a tag to compare
  • 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

25 Jun 13:18
Compare
Choose a tag to compare
  • Keep browser log listeners in headed mode (49ac915)

Full Changelog: v0.3.2...v0.3.3

v0.3.2

25 Jun 12:21
Compare
Choose a tag to compare
  • Await the last route status resolve before processing next status switch (639e70e)

Full Changelog: v0.3.1...v0.3.2