Releases: cloudfour/pleasantest
v1.5.0
Minor Changes
v1.4.0
Minor Changes
-
#314
542f3f9
Thanks @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
2b92fbc
Thanks @renovate! - Update@testing-library/dom
tov8.11.1
Read their release notes 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:
import { withBrowser } from 'pleasantest'; test( 'changelog example', withBrowser(async ({ screen }) => { // ElementHandle<HTMLButtonElement> const button = await screen.getByRole<HTMLButtonElement>(/button/); // ElementHandle<HTMLButtonElement>[] const buttons = await screen.getAllByRole<HTMLButtonElement>(/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 withPromise<ElementHandle<...>>
. 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 withPromise<Array<ElementHandle<...>>>
. -
#297
97e075c
Thanks @renovate! - Update puppeteer to v13.0.0 -
#236
67a222f
Thanks @calebeby! - Add accessibility snapshots feature:getAccessibilityTree
. This feature can be used to ensure that changes to the accessibility structure of your applications are intentional and correct. -
#327
dfc9620
Thanks @calebeby! - Add suggestion to error message when transformation plugin is missing for unrecognized file extensions
Patch Changes
v1.3.0
Minor Changes
- #234
bf53e31
Thanks @gerardo-rodriguez! - Allow functions to be passed to runJS
v1.2.0
Minor Changes
v1.1.1
v1.1.0
v1.0.0
v0.8.0
v0.7.0
Minor Changes
-
#146
8619f64
Thanks @calebeby! - Allow throwing things other than errors within withBrowser -
#104
69fd00b
Thanks @renovate! - Remove toHaveDescription, toBeInTheDOM, and toBeEmpty (they are deprecated by jest-dom) -
#104
69fd00b
Thanks @renovate! - Add toHaveAccessibleDescription and toHaveAccessibleName from jest-dom matchers
v0.6.2
Patch Changes
-
#139
1d5f16c
Thanks @calebeby! - Improve error message when Promise is passed into jest-dom matcher -
#143
0ba7584
Thanks @calebeby! - Improve CJS interop with packages that can't be statically analyzed -
#141
a9ef60c
Thanks @calebeby! - Refactor and improve browser stack trace printing -
#142
2da5f1c
Thanks @calebeby! - Fix bug where css files in node_modules were pre-bundled -
#143
0ba7584
Thanks @calebeby! - Allow resolving subfolders with package.json files