[Nightwatch] Add: types for BDD testing#59263
[Nightwatch] Add: types for BDD testing#59263typescript-bot merged 8 commits intoDefinitelyTyped:masterfrom
Conversation
|
@vaibhavsingh97 Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause 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
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"
} |
|
🔔 @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 |
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. nightwatch (unpkg)was missing the following properties:
as well as these 2 other properties...initClient, runner |
|
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! |
…d-other-api-commands
…d-other-api-commands
types/nightwatch/index.d.ts
Outdated
| globals(): any; | ||
| settings(): any; | ||
| argv(): any; | ||
| timeout(value: any): void; |
There was a problem hiding this comment.
Can we use more specific types for the parameters other than any? For example, number here.
There was a problem hiding this comment.
Fixed in latest commits
types/nightwatch/index.d.ts
Outdated
| name(): any; | ||
| tags(): any; | ||
| unitTest(): any; | ||
| endSessionOnFail(): any; |
There was a problem hiding this comment.
Should these be boolean instead of any?
There was a problem hiding this comment.
Fixed in latest commits
|
@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! |
types/nightwatch/index.d.ts
Outdated
| disabled(): any; | ||
| desiredCapabilities(): any; | ||
| page(): any; | ||
| globals(): any; |
There was a problem hiding this comment.
Could this leverage the NightwatchGlobals type instead of any?
There was a problem hiding this comment.
Nice catch, fixed in latest commits
types/nightwatch/index.d.ts
Outdated
| endSessionOnFail(): any; | ||
| skipTestcasesOnFail(): any; | ||
| disabled(): any; | ||
| desiredCapabilities(): any; |
There was a problem hiding this comment.
Could this leverage the NightwatchDesiredCapabilities type instead of any?
There was a problem hiding this comment.
Nice catch, fixed in latest commits
|
@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? |
types/nightwatch/index.d.ts
Outdated
| '[instance]': any; | ||
| '[attributes]': {}; | ||
| '[client]': NightwatchClient; | ||
| name(): any; |
There was a problem hiding this comment.
I think this would always be a string right?
types/nightwatch/index.d.ts
Outdated
| '[attributes]': {}; | ||
| '[client]': NightwatchClient; | ||
| name(): any; | ||
| tags(): any; |
There was a problem hiding this comment.
When I've used tags in tests it normally takes a string array. Should we narrow it to that here?
There was a problem hiding this comment.
I am not sure, not used tags much.
|
@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? |
|
@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:
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.) |
|
@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? |
|
Ready to merge |
Please fill in this template.
npm test <package to test>.If changing an existing definition:
If removing a declaration:
notNeededPackages.json.Fixes: #51549, nightwatchjs/nightwatch#3100