Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types migration #3714

Merged
merged 20 commits into from
May 15, 2023
Merged

Types migration #3714

merged 20 commits into from
May 15, 2023

Conversation

beatfactor
Copy link
Member

@beatfactor beatfactor commented May 4, 2023

This PRs moves the DT types into the project and adds additional types for the new element() apis in v3. Also adds separate type declarations for custom assertion, custom commands, and updates page object types.

TODO:

  • Fix broken tests

Copy link
Member

@garg3133 garg3133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of commits from DefinitelyTyped repo are not included in this PR (commits from Feb 21 and newer are missing). Is there any way we can include those without much manual work?

Apart from that, a few things missing:

types/index.d.ts Show resolved Hide resolved
types/assertions.d.ts Outdated Show resolved Hide resolved
types/assertions.d.ts Outdated Show resolved Hide resolved
types/chrome-options.d.ts Show resolved Hide resolved
types/custom-assertion.d.ts Outdated Show resolved Hide resolved
beatfactor and others added 5 commits May 8, 2023 17:28
Co-authored-by: Priyansh Garg <39924567+garg3133@users.noreply.github.com>
Co-authored-by: Priyansh Garg <39924567+garg3133@users.noreply.github.com>
NightwatchComponentTestingCommands,
NightwatchCustomCommands { }

export interface NightwatchComponentTestingCommands {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing with @beatfactor and @swrdfish we need to see what happens if this goes in and there is a clash? Does simply override or does it error? Can we see download numbers of the version that has been released and maybe remove it there and handle fall out?

@garg3133 and @vaibhavsingh97 can you look into this for me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem at all! Plugins can override the types, so we can easily deprecate it.

garg3133 and others added 10 commits May 9, 2023 19:14
* Add missing types in chrome-options.

* Add example for custom-assertions.

* Replace NightwatchBrowser with NightwatchAPI in globals.

* Fix screenshot type.

* Add section in expect types.

* Add type for app global and isAppiumClient.

* Partial merge of final DT PR.

* Add cookie and executeScript types.

* Add sessions and navigation types.

* Add types for window and frame commands.

* Add types for webdriver elements api.

* Fix indentation in chrome-options
@beatfactor beatfactor marked this pull request as ready for review May 15, 2023 18:39
@beatfactor beatfactor merged commit 8b2c850 into main May 15, 2023
15 checks passed
@beatfactor beatfactor deleted the feature/types branch May 15, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants