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

feat!: update WebDriverIO to v7 #6295

Merged
merged 3 commits into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/migrations/migrate-from-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ Please consider switching to ESLint. You can check out [`tslint-to-eslint-config
* Cypress is required as a peer dependency.
* Cypress is updated from v3 to v6. See [Cypress Migration Guide](https://docs.cypress.io/guides/references/migration-guide.html) for detailed instructions of the migration process.

### E2E-WebDriverIO Plugin

* WebDriverIO is updated from v6 to v7. Not many user-facing breaking changes. See the [blog post on release](https://webdriver.io/blog/2021/02/09/webdriverio-v7-released) for more details.

### Unit-Jest Plugin

* The underlying `jest`-related packages are upgraded from v24 to v26. For most users the transition would be seamless. See their corresponding changelogs for more detail:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ test('should add types to existing tsconfig.json', async () => {
const tsconfig = await read('tsconfig.json')
expect(tsconfig).toMatch(/\r?\n$/)
expect(JSON.parse(tsconfig).compilerOptions.types)
.toEqual(['some-type', 'mocha', '@wdio/mocha-framework', '@wdio/sync'])
.toEqual(['some-type', 'mocha', '@wdio/mocha-framework', 'webdriverio/sync'])
})
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const applyTS = module.exports.applyTS = (api, invoking) => {
const parsed = JSON.parse(tsconfig)
const types = parsed.compilerOptions.types
if (types) {
for (const t of ['mocha', '@wdio/mocha-framework', '@wdio/sync']) {
for (const t of ['mocha', '@wdio/mocha-framework', 'webdriverio/sync']) {
if (!types.includes(t)) {
types.push(t)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,6 @@ exports.config = {
// see also: https://webdriver.io/docs/dot-reporter.html
reporters: ['spec'],
//
// Options to be passed to Mocha.
// See the full list at http://mochajs.org/
mochaOpts: {
ui: 'bdd',
timeout: 30000,
<%_ if (hasTS) { _%>
require: 'ts-node/register',
<%_ } _%>
},
//
// =====
// Hooks
// =====
Expand Down
11 changes: 11 additions & 0 deletions packages/@vue/cli-plugin-e2e-webdriverio/migrator/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = (api) => {
if (api.fromVersion('<= 5.0.0-alpha.4')) {
api.render(files => {
if (!files['tsconfig.json']) {
return
}

files['tsconfig.json'] = files['tsconfig.json'].replace('"@wdio/sync"', '"webdriverio/sync"')
})
}
}
18 changes: 9 additions & 9 deletions packages/@vue/cli-plugin-e2e-webdriverio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
"dependencies": {
"@types/mocha": "^8.2.1",
"@vue/cli-shared-utils": "^5.0.0-alpha.4",
"@wdio/cli": "^6.10.5",
"@wdio/local-runner": "^6.10.5",
"@wdio/mocha-framework": "^6.10.4",
"@wdio/sauce-service": "^6.10.4",
"@wdio/spec-reporter": "^6.8.1",
"@wdio/sync": "^6.10.4",
"eslint-plugin-wdio": "^6.0.12",
"webdriverio": "^6.10.5"
"@wdio/cli": "^7.0.7",
"@wdio/local-runner": "^7.0.7",
"@wdio/mocha-framework": "^7.0.7",
"@wdio/sauce-service": "^7.0.7",
"@wdio/spec-reporter": "^7.0.7",
"@wdio/sync": "^7.0.7",
"eslint-plugin-wdio": "^7.0.0",
"webdriverio": "^7.0.7"
},
"peerDependencies": {
"chromedriver": "*",
"geckodriver": "*",
"wdio-chromedriver-service": "^6.0.4",
"wdio-chromedriver-service": "^7.0.0",
"wdio-geckodriver-service": "^1.1.2"
},
"peerDependenciesMeta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<%_ if (hasWebDriverIO) { _%>
<% if (!hasMocha && !hasJest) { %>"mocha",<% } %>
"@wdio/mocha-framework",
"@wdio/sync"<% if (hasMocha || hasJest) { %>,<% } %>
"webdriverio/sync"<% if (hasMocha || hasJest) { %>,<% } %>
<%_ } _%>
<%_ if (hasMocha) { _%>
"mocha",
Expand Down