diff --git a/.changeset/calm-crews-carry.md b/.changeset/calm-crews-carry.md deleted file mode 100644 index 713d9d376..000000000 --- a/.changeset/calm-crews-carry.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'pleasantest': minor ---- - -Improve printing of HTML elements in error messages - -- Printed HTML now is syntax-highlighted -- Adjacent whitespace is collapsed in places where the browser would collapse it diff --git a/.changeset/calm-houses-do.md b/.changeset/calm-houses-do.md deleted file mode 100644 index 95f6dbeb7..000000000 --- a/.changeset/calm-houses-do.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'pleasantest': minor ---- - -Update `@testing-library/dom` to [`v8.11.1`](https://github.com/testing-library/dom-testing-library/releases/tag/v8.11.1) - -Read their [release notes](https://github.com/testing-library/dom-testing-library/releases) for all the versions between 8.1.0 and 8.11.1 to see the full changes. - -Notably, we have added the ability for TypeScript users to optionally specify an element type as a type parameter for DTL queries: - -```ts -import { withBrowser } from 'pleasantest'; - -test( - 'changelog example', - withBrowser(async ({ screen }) => { - // ElementHandle - const button = await screen.getByRole(/button/); - - // ElementHandle[] - const buttons = await screen.getAllByRole(/button/); - }), -); -``` - -The return type is automatically determined based on the specified element type. Since Pleasantest DTL queries return `ElementHandle`s, the return type will be wrapped with `Promise>`. For queries which return arrays of elements, the singular version of the element type is accepted as the type parameter, and the return type will automatically be wrapped with `Promise>>`. diff --git a/.changeset/eighty-carrots-tap.md b/.changeset/eighty-carrots-tap.md deleted file mode 100644 index c47e9533e..000000000 --- a/.changeset/eighty-carrots-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -Update puppeteer to v12.0.1 diff --git a/.changeset/gold-rocks-sing.md b/.changeset/gold-rocks-sing.md deleted file mode 100644 index 35ac23dc6..000000000 --- a/.changeset/gold-rocks-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -(`experimentalGetAccessibilityTree`) The default value of `includeText` was changed to `true` diff --git a/.changeset/moody-apes-crash.md b/.changeset/moody-apes-crash.md deleted file mode 100644 index 9b74dd25e..000000000 --- a/.changeset/moody-apes-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': patch ---- - -Add logo (thanks @dromo77) diff --git a/.changeset/rotten-zoos-fold.md b/.changeset/rotten-zoos-fold.md deleted file mode 100644 index 525aba515..000000000 --- a/.changeset/rotten-zoos-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -In getAccessibilityTree, handle role="presentation" and role="none" (including support for required owned elements) diff --git a/.changeset/thick-singers-roll.md b/.changeset/thick-singers-roll.md deleted file mode 100644 index f93b15477..000000000 --- a/.changeset/thick-singers-roll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -Add experimental accessibility snapshots feature diff --git a/.changeset/tricky-islands-approve.md b/.changeset/tricky-islands-approve.md deleted file mode 100644 index cba1fb260..000000000 --- a/.changeset/tricky-islands-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -Add suggestion to error message when transformation plugin is missing for unrecognized file extensions diff --git a/.changeset/two-dingos-develop.md b/.changeset/two-dingos-develop.md deleted file mode 100644 index 9337cfd4f..000000000 --- a/.changeset/two-dingos-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': patch ---- - -Fix regression in stack frames handling when calling `user.*` and `screen.*` methods. diff --git a/.changeset/weak-bobcats-mate.md b/.changeset/weak-bobcats-mate.md deleted file mode 100644 index 20ddd5a6d..000000000 --- a/.changeset/weak-bobcats-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pleasantest': minor ---- - -(`experimentalGetAccessibilityTree`) Respect the `childrenArePresentational` role attribute when determining whether to display children diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6f3c94c..a639d0e2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,55 @@ # pleasantest +## 1.4.0 + +### Minor Changes + +- [#314](https://github.com/cloudfour/pleasantest/pull/314) [`542f3f9`](https://github.com/cloudfour/pleasantest/commit/542f3f96b62318cc159cdabf135fc3ba33cefc35) Thanks [@calebeby](https://github.com/calebeby)! - Improve printing of HTML elements in error messages + + - Printed HTML now is syntax-highlighted + - Adjacent whitespace is collapsed in places where the browser would collapse it + +* [#265](https://github.com/cloudfour/pleasantest/pull/265) [`2b92fbc`](https://github.com/cloudfour/pleasantest/commit/2b92fbcd1f47f8ab020ff26be276a9da02b9b368) Thanks [@renovate](https://github.com/apps/renovate)! - Update `@testing-library/dom` to [`v8.11.1`](https://github.com/testing-library/dom-testing-library/releases/tag/v8.11.1) + + Read their [release notes](https://github.com/testing-library/dom-testing-library/releases) for all the versions between 8.1.0 and 8.11.1 to see the full changes. + + Notably, we have added the ability for TypeScript users to optionally specify an element type as a type parameter for DTL queries: + + ```ts + import { withBrowser } from 'pleasantest'; + + test( + 'changelog example', + withBrowser(async ({ screen }) => { + // ElementHandle + const button = await screen.getByRole(/button/); + + // ElementHandle[] + const buttons = await screen.getAllByRole(/button/); + }), + ); + ``` + + The return type is automatically determined based on the specified element type. Since Pleasantest DTL queries return `ElementHandle`s, the return type will be wrapped with `Promise>`. For queries which return arrays of elements, the singular version of the element type is accepted as the type parameter, and the return type will automatically be wrapped with `Promise>>`. + +- [#297](https://github.com/cloudfour/pleasantest/pull/297) [`97e075c`](https://github.com/cloudfour/pleasantest/commit/97e075c915dedc754abcdb5de0db4e757479e02f) Thanks [@renovate](https://github.com/apps/renovate)! - Update puppeteer to v12.0.1 + +* [#251](https://github.com/cloudfour/pleasantest/pull/251) [`8163923`](https://github.com/cloudfour/pleasantest/commit/816392347d059f43311be3b9c1a5472c2b62919d) Thanks [@Paul-Hebert](https://github.com/Paul-Hebert)! - (`experimentalGetAccessibilityTree`) The default value of `includeText` was changed to `true` + +- [#313](https://github.com/cloudfour/pleasantest/pull/313) [`5b227a0`](https://github.com/cloudfour/pleasantest/commit/5b227a03521750c31d7940904ab23e3ed8f70791) Thanks [@calebeby](https://github.com/calebeby)! - In getAccessibilityTree, handle role="presentation" and role="none" (including support for required owned elements) + +* [#236](https://github.com/cloudfour/pleasantest/pull/236) [`67a222f`](https://github.com/cloudfour/pleasantest/commit/67a222f62bc96ce2a646f9ed0670a5959f60c7ac) Thanks [@calebeby](https://github.com/calebeby)! - Add experimental accessibility snapshots feature + +- [#327](https://github.com/cloudfour/pleasantest/pull/327) [`dfc9620`](https://github.com/cloudfour/pleasantest/commit/dfc9620712ba12d355d84fe2165722ccf2314176) Thanks [@calebeby](https://github.com/calebeby)! - Add suggestion to error message when transformation plugin is missing for unrecognized file extensions + +* [#251](https://github.com/cloudfour/pleasantest/pull/251) [`8163923`](https://github.com/cloudfour/pleasantest/commit/816392347d059f43311be3b9c1a5472c2b62919d) Thanks [@Paul-Hebert](https://github.com/Paul-Hebert)! - (`experimentalGetAccessibilityTree`) Respect the `childrenArePresentational` role attribute when determining whether to display children + +### Patch Changes + +- [#283](https://github.com/cloudfour/pleasantest/pull/283) [`93b3922`](https://github.com/cloudfour/pleasantest/commit/93b39227f87196c01319a4650af34fa8371bfa14) Thanks [@calebeby](https://github.com/calebeby)! - Add logo (thanks @dromo77) + +* [#290](https://github.com/cloudfour/pleasantest/pull/290) [`e9808b5`](https://github.com/cloudfour/pleasantest/commit/e9808b59ef6836904897895981dc6a53ce0ab64a) Thanks [@calebeby](https://github.com/calebeby)! - Fix regression in stack frames handling when calling `user.*` and `screen.*` methods. + ## 1.3.0 ### Minor Changes diff --git a/package.json b/package.json index 4beb2d680..d691fce42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pleasantest", - "version": "1.3.0", + "version": "1.4.0", "engines": { "node": "^12.2 || 14 || 16" },