diff --git a/packages/@vue/cli-plugin-unit-jest/ui.js b/packages/@vue/cli-plugin-unit-jest/ui.js new file mode 100644 index 0000000000..34ab1612a9 --- /dev/null +++ b/packages/@vue/cli-plugin-unit-jest/ui.js @@ -0,0 +1,30 @@ +module.exports = api => { + api.describeTask({ + match: /vue-cli-service test:unit/, + description: 'jest.tasks.test.description', + link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-jest#injected-commands', + prompts: [ + { + name: 'watch', + type: 'confirm', + description: 'jest.tasks.test.watch' + }, + { + name: 'notify', + type: 'confirm', + description: 'jest.tasks.test.notify', + when: answers => answers.watch + }, + { + name: 'update', + type: 'confirm', + description: 'jest.tasks.test.update' + } + ], + onBeforeRun: ({ answers, args }) => { + if (answers.watch) args.push('--watch') + if (answers.notify) args.push('--notify') + if (answers.update) args.push('--updateSnapshot') + } + }) +} diff --git a/packages/@vue/cli-ui/locales/en.json b/packages/@vue/cli-ui/locales/en.json index a184adc9f3..89cf5816e1 100644 --- a/packages/@vue/cli-ui/locales/en.json +++ b/packages/@vue/cli-ui/locales/en.json @@ -511,5 +511,15 @@ "url": "Run e2e tests against given url instead of auto-starting dev server" } } + }, + "jest": { + "tasks": { + "test": { + "description": "Run unit tests with Jestks", + "watch": "Watch files for changes and rerun tests related to changed files", + "notify": "Display a notification after each run", + "update": "Re-record every snapshot that fails during this test run" + } + } } } diff --git a/packages/@vue/cli-ui/src/style/main.styl b/packages/@vue/cli-ui/src/style/main.styl index bfd1cceefd..177a0a41c7 100644 --- a/packages/@vue/cli-ui/src/style/main.styl +++ b/packages/@vue/cli-ui/src/style/main.styl @@ -152,3 +152,9 @@ ansi-colors('white', $vue-ui-color-light) height 1px background rgba($vue-ui-color-dark, .1) margin ($padding-item / 2) 0 + +.vue-ui-modal + &.anchor + align-items flex-start + .shell + margin-top 42px \ No newline at end of file diff --git a/packages/@vue/cli-ui/src/views/ProjectTaskDetails.vue b/packages/@vue/cli-ui/src/views/ProjectTaskDetails.vue index 72fc27c6d5..d95cb4310e 100644 --- a/packages/@vue/cli-ui/src/views/ProjectTaskDetails.vue +++ b/packages/@vue/cli-ui/src/views/ProjectTaskDetails.vue @@ -106,7 +106,7 @@