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 0891c8e

Browse files
feat: add Playwright for end-to-end testing
1 parent 904fa48 commit 0891c8e

File tree

14 files changed

+3327
-1528
lines changed

14 files changed

+3327
-1528
lines changed

‎LICENSE‎

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -31,64 +31,6 @@ MIT
3131

3232
## Bundled dependencies
3333

34-
## @vue/create-eslint-config
35-
36-
License: MIT
37-
By: Haoqun Jiang
38-
Repository: git+https://github.com/vuejs/create-eslint-config.git
39-
40-
> MIT License
41-
>
42-
> Copyright (c) 2022 vuejs
43-
>
44-
> Permission is hereby granted, free of charge, to any person obtaining a copy
45-
> of this software and associated documentation files (the "Software"), to deal
46-
> in the Software without restriction, including without limitation the rights
47-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48-
> copies of the Software, and to permit persons to whom the Software is
49-
> furnished to do so, subject to the following conditions:
50-
>
51-
> The above copyright notice and this permission notice shall be included in all
52-
> copies or substantial portions of the Software.
53-
>
54-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
60-
> SOFTWARE.
61-
>
62-
63-
## javascript-stringify
64-
65-
License: MIT
66-
By: Blake Embrey
67-
Repository: git+https://github.com/blakeembrey/javascript-stringify.git
68-
69-
> The MIT License (MIT)
70-
>
71-
> Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
72-
>
73-
> Permission is hereby granted, free of charge, to any person obtaining a copy
74-
> of this software and associated documentation files (the "Software"), to deal
75-
> in the Software without restriction, including without limitation the rights
76-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77-
> copies of the Software, and to permit persons to whom the Software is
78-
> furnished to do so, subject to the following conditions:
79-
>
80-
> The above copyright notice and this permission notice shall be included in
81-
> all copies or substantial portions of the Software.
82-
>
83-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89-
> THE SOFTWARE.
90-
>
91-
9234
## kleur
9335

9436
License: MIT

‎index.ts‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ async function init() {
6868
// --with-tests / --tests (equals to `--vitest --cypress`)
6969
// --vitest
7070
// --cypress
71+
// --playwright
7172
// --eslint
7273
// --eslint-with-prettier (only support prettier through eslint for simplicity)
7374
// --force (for force overwriting)
@@ -92,6 +93,7 @@ async function init() {
9293
argv.tests ??
9394
argv.vitest ??
9495
argv.cypress ??
96+
argv.playwright ??
9597
argv.eslint
9698
) === 'boolean'
9799

@@ -110,6 +112,7 @@ async function init() {
110112
needsPinia?: boolean
111113
needsVitest?: boolean
112114
needsCypress?: boolean
115+
needsPlaywright?: boolean
113116
needsEslint?: boolean
114117
needsPrettier?: boolean
115118
} = {}
@@ -124,6 +127,7 @@ async function init() {
124127
// - Install Vue Router for SPA development?
125128
// - Install Pinia for state management?
126129
// - Add Cypress for testing?
130+
// - Add Playwright for end-to-end testing?
127131
// - Add ESLint for code quality?
128132
// - Add Prettier for code formatting?
129133
result = await prompts(
@@ -212,6 +216,19 @@ async function init() {
212216
active: 'Yes',
213217
inactive: 'No'
214218
},
219+
{
220+
name: 'needsPlaywright',
221+
type: (prev, values) => {
222+
if (isFeatureFlagsUsed || values.needsCypress) {
223+
return null
224+
}
225+
return 'toggle'
226+
},
227+
message: 'Add Playwright for End-to-End testing?',
228+
initial: false,
229+
active: 'Yes',
230+
inactive: 'No'
231+
},
215232
{
216233
name: 'needsEslint',
217234
type: () => (isFeatureFlagsUsed ? null : 'toggle'),
@@ -256,6 +273,7 @@ async function init() {
256273
needsRouter = argv.router,
257274
needsPinia = argv.pinia,
258275
needsCypress = argv.cypress || argv.tests,
276+
needsPlaywright = argv.playwright,
259277
needsVitest = argv.vitest || argv.tests,
260278
needsEslint = argv.eslint || argv['eslint-with-prettier'],
261279
needsPrettier = argv['eslint-with-prettier']
@@ -306,6 +324,9 @@ async function init() {
306324
if (needsCypressCT) {
307325
render('config/cypress-ct')
308326
}
327+
if (needsPlaywright) {
328+
render('config/playwright')
329+
}
309330
if (needsTypeScript) {
310331
render('config/typescript')
311332

@@ -408,6 +429,7 @@ async function init() {
408429
needsTypeScript,
409430
needsVitest,
410431
needsCypress,
432+
needsPlaywright,
411433
needsCypressCT,
412434
needsEslint
413435
})

0 commit comments

Comments
(0)

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