Skip to content

Commit b728624

Browse files
elevatebartyyx990803
authored andcommitted
fix(test): e2e w/ typescript (#933)
* fix(typescript): when using router e2e fail When using typescript and router, the pag return "Welcome to Your Vue.js App" instead of the "+ TypeScript" phrase. * feat(typescript e2e tests): tested cypress and nightwatch * fix(typescript e2e test): timeout issue
1 parent c1516c3 commit b728624

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
jest.setTimeout(40000)
2+
3+
const create = require('@vue/cli-test-utils/createTestProject')
4+
5+
test('cypress', async () => {
6+
const project = await create('ts-e2e-cypress', {
7+
plugins: {
8+
'@vue/cli-plugin-typescript': {},
9+
'@vue/cli-plugin-e2e-cypress': {}
10+
}
11+
})
12+
await project.run(`vue-cli-service e2e`)
13+
})
14+
15+
test('cypress with router', async () => {
16+
const project = await create('ts-e2e-cypress', {
17+
router: true,
18+
plugins: {
19+
'@vue/cli-plugin-typescript': {},
20+
'@vue/cli-plugin-e2e-cypress': {}
21+
}
22+
})
23+
await project.run(`vue-cli-service e2e`)
24+
})
25+
26+
test('nightwatch', async () => {
27+
const project = await create('ts-e2e-nightwatch', {
28+
plugins: {
29+
'@vue/cli-plugin-typescript': {},
30+
'@vue/cli-plugin-e2e-cypress': {}
31+
}
32+
})
33+
await project.run(`vue-cli-service e2e`)
34+
})

packages/@vue/cli-plugin-typescript/generator/template/src/views/Home.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<template>
33
<div class="home">
44
<img src="../assets/logo.png">
5-
<HelloWorld msg="Welcome to Your Vue.js App"/>
5+
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/>
66
</div>
77
</template>
88

0 commit comments

Comments
 (0)