mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-20 04:28:28 -05:00
feat!: update WebDriverIO to v7 (#6295)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'])
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
// =====
|
||||
|
||||
@@ -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"')
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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": {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user