Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6bace64

Browse files
feat: add Playwright for end-to-end testing
1 parent 8ad42c2 commit 6bace64

File tree

15 files changed

+1909
-7
lines changed

15 files changed

+1909
-7
lines changed

‎index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async function init() {
5757
// --with-tests / --tests (equals to `--vitest --cypress`)
5858
// --vitest
5959
// --cypress
60+
// --playwright
6061
// --eslint
6162
// --eslint-with-prettier (only support prettier through eslint for simplicity)
6263
// --force (for force overwriting)
@@ -82,6 +83,7 @@ async function init() {
8283
argv.tests ||
8384
argv.vitest ||
8485
argv.cypress ||
86+
argv.playwright ||
8587
argv.eslint
8688
) === 'boolean'
8789

@@ -102,6 +104,7 @@ async function init() {
102104
// - Install Vue Router for SPA development?
103105
// - Install Pinia for state management?
104106
// - Add Cypress for testing?
107+
// - Add Playwright for end-to-end testing?
105108
// - Add ESLint for code quality?
106109
// - Add Prettier for code formatting?
107110
result = await prompts(
@@ -190,6 +193,14 @@ async function init() {
190193
active: 'Yes',
191194
inactive: 'No'
192195
},
196+
{
197+
name: 'needsPlaywright',
198+
type: () => (isFeatureFlagsUsed ? null : 'toggle'),
199+
message: 'Add Playwright for End-to-End testing?',
200+
initial: false,
201+
active: 'Yes',
202+
inactive: 'No'
203+
},
193204
{
194205
name: 'needsEslint',
195206
type: () => (isFeatureFlagsUsed ? null : 'toggle'),
@@ -234,6 +245,7 @@ async function init() {
234245
needsRouter = argv.router,
235246
needsPinia = argv.pinia,
236247
needsCypress = argv.cypress || argv.tests,
248+
needsPlaywright = argv.playwright,
237249
needsVitest = argv.vitest || argv.tests,
238250
needsEslint = argv.eslint || argv['eslint-with-prettier'],
239251
needsPrettier = argv['eslint-with-prettier']
@@ -284,6 +296,9 @@ async function init() {
284296
if (needsCypressCT) {
285297
render('config/cypress-ct')
286298
}
299+
if (needsPlaywright) {
300+
render('config/playwright')
301+
}
287302
if (needsTypeScript) {
288303
render('config/typescript')
289304

@@ -385,6 +400,7 @@ async function init() {
385400
needsTypeScript,
386401
needsVitest,
387402
needsCypress,
403+
needsPlaywright,
388404
needsCypressCT,
389405
needsEslint
390406
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /