breaking(webdriverio): remove legacy command signatures - #15712
Merged
Merged
Conversation
v10 only accepts the options-object forms of addCommand, overwriteCommand, getCookies, getHTML, newWindow, and startActivity.
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/display-server
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
webdriver
webdriverio
commit: |
1 task
|
📖 Docs preview for e7350a3: https://15712.preview.webdriver.io |
Contributor
|
TypeScript reports the removed newWindow options once, so the test keeps a single expect-error. The migration guide names getCookies and installs the codemod before running it.
7 tasks
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
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.
Summary
Removes the v9 compatibility forms tracked in #15655. A boolean third argument to
addCommand/overwriteCommandis now a TypeScript error and throws at runtime.getCookiesonly accepts an object filter,getHTMLonly accepts an options object,newWindowdropswindowName/windowFeatures, andstartActivityonly accepts the options object.Migration examples for each replacement are in the v9 to v10 guide. The mechanical rewrites are in webdriverio/codemod#140.
Test plan
addCommand,overwriteCommand,getCookies,getHTML,newWindow,startActivity, the protocol stub, and the monadtests/typings/webdriveriorejects the removed signatures and accepts the options-object forms@wdio/codemodv10 transform coversaddCommand,overwriteCommand,getHTML(boolean),getCookies(string), andgetCookie(string)(feat: add a v10 transform for legacy command signatures codemod#140)mochaTestrunner,multiremote) covers the updated custom-command callsFixes #15655