Skip to content

[Nightwatch] Add: types for BDD testing#59263

Merged
typescript-bot merged 8 commits intoDefinitelyTyped:masterfrom
vaibhavsingh97:feat/bdd-typings-and-other-api-commands
Apr 1, 2022
Merged

[Nightwatch] Add: types for BDD testing#59263
typescript-bot merged 8 commits intoDefinitelyTyped:masterfrom
vaibhavsingh97:feat/bdd-typings-and-other-api-commands

Conversation

@vaibhavsingh97
Copy link
Copy Markdown
Contributor

@vaibhavsingh97 vaibhavsingh97 commented Mar 14, 2022

Please fill in this template.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

Fixes: #51549, nightwatchjs/nightwatch#3100

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Mar 14, 2022

@vaibhavsingh97 Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners, DT maintainers or others

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 59263,
  "author": "vaibhavsingh97",
  "headCommitOid": "1513f5d8dfbfcc83e5ac20a2e2d05130ab0602be",
  "mergeBaseOid": "d4f7c07666c2cfc5437995378b09730658e9a941",
  "lastPushDate": "2022-04-01T16:03:25.000Z",
  "lastActivityDate": "2022-04-01T16:16:41.000Z",
  "mergeOfferDate": "2022-04-01T16:15:28.000Z",
  "mergeRequestDate": "2022-04-01T16:16:41.000Z",
  "mergeRequestUser": "vaibhavsingh97",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "nightwatch",
      "kind": "edit",
      "files": [
        {
          "path": "types/nightwatch/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/nightwatch/test/nightwatch-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "rkavalap",
        "schlesiger",
        "ClaytonAstrom",
        "lloiser",
        "vaibhavsingh97",
        "beatfactor",
        "AutomatedTester",
        "gravityvi",
        "swrdfish",
        "harshit-bs",
        "literallyMello",
        "lukebickell"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "literallyMello",
      "date": "2022-04-01T16:14:50.000Z",
      "isMaintainer": false
    },
    {
      "type": "stale",
      "reviewer": "reallymello",
      "date": "2022-04-01T15:51:51.000Z",
      "abbrOid": "6c12bb2"
    },
    {
      "type": "stale",
      "reviewer": "AutomatedTester",
      "date": "2022-04-01T14:23:56.000Z",
      "abbrOid": "2f87231"
    }
  ],
  "mainBotCommentID": 1066473852,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Author is Owner The author of this PR is a listed owner of the package. label Mar 14, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Mar 14, 2022

🔔 @rkavalap @schlesiger @ClaytonAstrom @lloiser @beatfactor @AutomatedTester @gravityvi @swrdfish @harshit-bs @literallyMello @lukebickell — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@DangerBotOSS
Copy link
Copy Markdown

DangerBotOSS commented Mar 14, 2022

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

nightwatch (unpkg)

was missing the following properties:

  1. createClient
  2. client
  3. cli
  4. runTests
  5. CliRunner
as well as these 2 other properties...

initClient, runner

Generated by 🚫 dangerJS against 1513f5d

@vaibhavsingh97 vaibhavsingh97 changed the title Add: types for BDD testing [Nightwatch] Add: types for BDD testing Mar 14, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

Re-ping @rkavalap, @schlesiger, @ClaytonAstrom, @lloiser, @beatfactor, @AutomatedTester, @gravityvi, @swrdfish, @harshit-bs:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Mar 25, 2022
@typescript-bot typescript-bot removed the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Mar 30, 2022
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 1, 2022
@typescript-bot typescript-bot removed Self Merge This PR can now be self-merged by the PR author or an owner Owner Approved A listed owner of this package signed off on the pull request. labels Apr 1, 2022
globals(): any;
settings(): any;
argv(): any;
timeout(value: any): void;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we use more specific types for the parameters other than any? For example, number here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest commits

name(): any;
tags(): any;
unitTest(): any;
endSessionOnFail(): any;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should these be boolean instead of any?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest commits

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Apr 1, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@vaibhavsingh97 One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

disabled(): any;
desiredCapabilities(): any;
page(): any;
globals(): any;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could this leverage the NightwatchGlobals type instead of any?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, fixed in latest commits

endSessionOnFail(): any;
skipTestcasesOnFail(): any;
disabled(): any;
desiredCapabilities(): any;
Copy link
Copy Markdown

@literallyMello literallyMello Apr 1, 2022

Choose a reason for hiding this comment

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

Could this leverage the NightwatchDesiredCapabilities type instead of any?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, fixed in latest commits

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Apr 1, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@literallyMello, @AutomatedTester Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

'[instance]': any;
'[attributes]': {};
'[client]': NightwatchClient;
name(): any;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this would always be a string right?

'[attributes]': {};
'[client]': NightwatchClient;
name(): any;
tags(): any;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When I've used tags in tests it normally takes a string array. Should we narrow it to that here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, not used tags much.

@typescript-bot
Copy link
Copy Markdown
Contributor

@reallymello, @literallyMello, @AutomatedTester Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 1, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@vaibhavsingh97: Everything looks good here. I am ready to merge this PR (at 1513f5d) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@rkavalap, @schlesiger, @ClaytonAstrom, @lloiser, @beatfactor, @AutomatedTester, @gravityvi, @swrdfish, @harshit-bs, @literallyMello, @lukebickell: you can do this too.)

@typescript-bot
Copy link
Copy Markdown
Contributor

@reallymello, @AutomatedTester Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@vaibhavsingh97
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 57102a9 into DefinitelyTyped:master Apr 1, 2022
@vaibhavsingh97 vaibhavsingh97 deleted the feat/bdd-typings-and-other-api-commands branch April 1, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@types/nightwatch types for BDD testing

6 participants