Releases: hammzj/cypress-page-object
v2.3.0: Make types more generic
What
Tried to make the typings for the Elements and nested ComponentObject functions a bit easier to manage. TypeScript would produce errors on certain ElementSelectorFunction
instances, for example, like returning a HTMLAnchorElement
, so it was better to reference the Cypress return types for element selectors there.
Also did the same for the ComponentObjectFunction
, where it uses a generic type for determining the component object function. This helps avoid issues with protected
elements and components producing warnings when they are declared public in an extended class.
See:
v2.2.0: Allow usage in JS projects
What
This release should allow usage in JavaScript projects for node versions 18+. It should also work for TS projects targeting ES6 or newer.
What's Changed
Full Changelog: v2.1.2...v2.2.0
v2.1.2: addElements and addComponents methods
What's Changed
Full Changelog: v2.1.1...v2.1.2
Add this.addElements
and this.addComponents
/this.addNestedComponents
These methods will help remove warnings around declaring this.elements
or this.components
before initialization. Call these methods in the constructor and assign an object of element selectors or nested component objects, respectively.
Note: In TypeScript, you will need to add public elements: Elements
and public components: NestedComponents
in order to use them outside of the class!
Removed lodash
Make this a bit more lightweight. It's not needed.
v2.1.1
v2.1.0
v2.0.4: Fix parameter types
What's Changed
- Add ElementSelectorFunction type
- Make elements and components as protected, so they're not immediately public
- Make page metadata protected
Full Changelog: v2.0.2-hotfix...v2.0.4
v2.0.3: Fix parameter types
What's Changed
- Add ElementSelectorFunction type
- Make elements and components as protected, so they're not immediately public
Full Changelog: v2.0.2-hotfix...v2.0.3
v2.0.2: TypeScript support (somewhat) + bug fixes
What's Changed
Full Changelog: v2.0.1...v2.0.2
V2.0.1: TypeScript support (somewhat)
What's Changed
- TypeScript typings added, but not globally supported. There are still some issues in other suites, so there's a lot of
any
(mainly due toComponentObjectFunction
- renamed
_nestedObject
function toperformWithin
- Remove
_clone
method onElementCollection
: it does not work with element selector functions declared in an object - Add
tsc-and-lint
workflow - Fix thrown error for nested page objects
2.0.0 is identical, but this has a github workflow change.