Skip to content

Releases: hammzj/cypress-page-object

v2.3.0: Make types more generic

16 May 14:24
c4e8eff
Compare
Choose a tag to compare

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

29 Apr 13:21
e48c0c2
Compare
Choose a tag to compare

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

25 Apr 14:03
06ac465
Compare
Choose a tag to compare

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

18 Apr 14:47
75d5e3f
Compare
Choose a tag to compare

What

Reverted #13 and #14. I could not delete those package from the NPM Registry, so want to get a quick fix out in the meantime.

v2.1.0

17 Apr 19:06
efdfeb5
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.4...v2.1.0-hotfix-1

v2.0.4: Fix parameter types

16 Apr 20:47
83c6463
Compare
Choose a tag to compare

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

16 Apr 20:25
33f7328
Compare
Choose a tag to compare

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

12 Apr 17:16
93d91c9
Compare
Choose a tag to compare

What's Changed

  • fix:do not run postinstall when installing the actual package by @hammzj in #10

Full Changelog: v2.0.1...v2.0.2

V2.0.1: TypeScript support (somewhat)

12 Apr 17:01
0a3cc3e
Compare
Choose a tag to compare

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 to ComponentObjectFunction
  • renamed _nestedObject function to performWithin
  • Remove _clone method on ElementCollection: 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.

v1.1.0

16 Jan 13:31
a2f7c6b
Compare
Choose a tag to compare

What's Changed

  • add:simple assertion methods for component object by @hammzj in #7

Full Changelog: v1.0.1...v1.1.0