-
Notifications
You must be signed in to change notification settings - Fork 39
Typescript take two #488
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
Merged
Merged
Typescript take two #488
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RickiJay-WMDE
commented
Oct 10, 2023
* fix: wait for result page text
lorenjohnson
approved these changes
Oct 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tested locally. Everything is happy 🎉
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Typescript
Where possible, explicit type annotations were added to functions and ambiguously typed variables. Some custom types were defined based on apparent usage;
WebDriverIO.Browser
was extended to reflect the commands added indefault-functions.ts
. Configuration files were also changed to Typescript, anddeepmerge-ts
removed as an explicit dependency (though it remains an implicit one).getElementByURI
Previously returned
[]
if a binding with the requesteduri
was not found.null
was easier to check against when actually using the function inqueryservice-post-upgrade
tests.editPage
editPage
indefault-functions.ts
is the only place where asubmit()
method is used directly on aWebDriverIO.Element
, which needed to be extended to include asubmit()
property (though as far as I can tell we aren't defining the method). Additionally, it included abrowser.execute()
call that passedthis
as a second parameter. Typescript complained thatbrowser.execute()
expected only 1 parameter, so I removed thethis
. Everything still seems to work.Custom Types
Binding
: returned byqueryBlazeGraphItem
BotResponse
: returned bydeleteClaim
DatabaseConfig
: parameter fordbQuery
ExternalChange
: parameter and return type forgetDispatchedExternalChange
LuaCPUValue
: returned bygetLuaCpuTime
TestResult
andResultType
: used byJsonReporter
skipIfExtensionNotPresent
Most of our tests are written with
() => {}
format, whileskipIfExtensionNotPresent
explicitly requiresfunction () {}
format. Additionally, I couldn't find a spec file that usedskipIfExtensionNotPresent
on only one test of several, so I rearranged the spec files to useskipIfExtensionNotPresent
in abeforeEach
hook rather than in each test. The exception isspecial-version.ts
, which checks against each extension in turn.