Skip to content

Commit 84a9ebb

Browse files
test(e2e.spec.js): fix unit tests
1 parent 31cf232 commit 84a9ebb

File tree

1 file changed

+30
-2
lines changed
  • packages/@vue/cli/lib/promptModules/__tests__

1 file changed

+30
-2
lines changed

packages/@vue/cli/lib/promptModules/__tests__/e2e.spec.js

+30-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('cypress', async () => {
1414
},
1515
{
1616
message: 'Pick an E2E testing solution',
17-
choices: ['Cypress', 'Nightwatch'],
17+
choices: ['Cypress', 'Nightwatch', 'WebdriverIO'],
1818
choose: 0
1919
}
2020
]
@@ -42,7 +42,7 @@ test('nightwatch', async () => {
4242
},
4343
{
4444
message: 'Pick an E2E testing solution',
45-
choices: ['Cypress', 'Nightwatch'],
45+
choices: ['Cypress', 'Nightwatch', 'WebdriverIO'],
4646
choose: 1
4747
},
4848
{
@@ -65,3 +65,31 @@ test('nightwatch', async () => {
6565
{ pluginsOnly: true }
6666
)
6767
})
68+
69+
test('webdriverio', async () => {
70+
const expectedPrompts = [
71+
{
72+
message: 'features',
73+
choices: ['E2E Testing'],
74+
check: [0]
75+
},
76+
{
77+
message: 'Pick an E2E testing solution',
78+
choices: ['Cypress', 'Nightwatch', 'WebdriverIO'],
79+
choose: 2
80+
}
81+
]
82+
83+
const expectedOptions = {
84+
plugins: {
85+
'@vue/cli-plugin-e2e-webdriverio': {}
86+
}
87+
}
88+
89+
await assertPromptModule(
90+
moduleToTest,
91+
expectedPrompts,
92+
expectedOptions,
93+
{ pluginsOnly: true }
94+
)
95+
})

0 commit comments

Comments
 (0)