Releases: dnotes/quickpickle
[email protected]
Patch Changes
- 6713729: Fix improper type for world.data - no more TS errors for storing arbitrary data there.
@quickpickle/[email protected]
Patch Changes
- Updated dependencies [6713729]
@quickpickle/[email protected]
Major Changes
-
0d8c653: ## 1.0 release
From this point forward, the step definitions in "actions" and "outcomes"
should be stable, and any changes to the step names will result in a new
minor version release.I was hoping to have some system for using only some of the step definitions
provided by the module, or for overriding or deleting them, but I think that
will have to wait for the next major release.Identities
The last thing added for this release is the functionality for multiple browsers
or "identities". Switching identity starts a new browser context, with completely
new local data, making it possible to test interactions between different users.Each test will start with a "default" identity, and new browser contexts open
on the same url as the "default" identity.Note that no actual user is created as a result of switching identity; if you
need more setup, you can create a custom world constructor extending the
PlaywrightWorld class and override the "setIdentity" method.The following new step definitions all simply call "world.setIdentity()", which
creates a new browser context if necessary and switches to it:(as )a/an/the (user ){string}(as )a/an/the {string} user/role/browser/identityI am {string}I am a/an/the (user ){string}I am a/an/the {string} user/role/browser/identityas {string}
New step definitions
I am on the home/front pageopens the base url.
Minor Changes
- 0f76132: Added multiple browser identities for playwright.
Patch Changes
- Updated dependencies [6713729]
[email protected]
Minor Changes
-
f14aafc: - Made the VisualWorld.getScreenshotPath method idempotent
- Added projectRoot getter to QuickPickleWorld
-
596516b: Added an "AriaRole" parameter type, matching all Aria roles
as well as the quickpickle-specific extensions "input" and "element"@quickpickle/playwright now uses this matcher instead of {word} for
matching visual elements on the page. -
1619ff4: Added a "weight" property to Hooks for ordering.
@quickpickle/playwright uses the new weight property to ensure that
its After hook gets run last (weight:99), so that there will still
be a browser in other After hooks. The upshot of this is that now
you can write hooks like the following, which takes a screenshot
after any Scenario with the proper tag:After("@screenshot", async (world: PlaywrightWorld) => { await world.screenshot(); });
-
cead779: This release adds new interfaces and world constructor class for a "VisualWorld"
to QuickPickle main library. All visual testing libraries (Playwright, Vitest Browser)
should implement the VisualWorldInterface, and may extend the VisualWorld class,
which encapsulates helpful functionality for screenshots.
@quickpickle/[email protected]
@quickpickle/[email protected]
Patch Changes
- 61d43fa: Fix an error that arises when a mask is set and two screenshots are taken within one test.
@quickpickle/[email protected]
Minor Changes
-
cdc087d: Use the new custom screenshot comparison engine from VisualWorld.
IMPORTANT: This upgrade may result in minor changes to existing visual regression baselines. -
596516b: Added an "AriaRole" parameter type, matching all Aria roles
as well as the quickpickle-specific extensions "input" and "element"@quickpickle/playwright now uses this matcher instead of {word} for
matching visual elements on the page. -
1619ff4: Added a "weight" property to Hooks for ordering.
@quickpickle/playwright uses the new weight property to ensure that
its After hook gets run last (weight:99), so that there will still
be a browser in other After hooks. The upshot of this is that now
you can write hooks like the following, which takes a screenshot
after any Scenario with the proper tag:After("@screenshot", async (world: PlaywrightWorld) => { await world.screenshot(); });
-
cead779: This release adds new interfaces and world constructor class for a "VisualWorld"
to QuickPickle main library. All visual testing libraries (Playwright, Vitest Browser)
should implement the VisualWorldInterface, and may extend the VisualWorld class,
which encapsulates helpful functionality for screenshots.
Patch Changes
[email protected]
Minor Changes
-
e617638: Added new VisualWorld base class and interface
-
the VisualWorld class provides some basic functionality related to screenshots,
so that any descendant classes will not have to do things like parse their own
screenshot filenames or implement their own image diff solution. -
the VisualWorldInterface defines a set of helper methods to be implemented by
descendant classes.
-
[email protected]
Minor Changes
-
8a32a09: Add a true path sanitizer to the base World object
BREAKING CHANGE:
The base world object no longer has a public
projectRootproperty.
Instead of constructing paths that way, developers should use the
world.fullPath()method to get the full path to a file or subfolder.
This should ensure that only files below the projectRoot are accessed.Playwright and Browser world constructors no longer have the
sanitizeFilepath method. Instead, there is a new "sanitizePath"
method on the base World, which should be relatively safe even
for user input, avoiding path traversal and the like.