chore: upgrade cypress 10

This commit is contained in:
mutoe 2022-06-09 20:51:40 +08:00
parent a69b946a38
commit 9c35965a7e
No known key found for this signature in database
GPG Key ID: 7197231B847AE2EE
12 changed files with 24 additions and 13 deletions

14
cypress.config.ts Normal file
View File

@ -0,0 +1,14 @@
import { defineConfig } from 'cypress'
export default defineConfig({
projectId: 'j7s91r',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:4173',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
})

View File

@ -1,4 +0,0 @@
{
"projectId": "j7s91r",
"baseUrl": "http://localhost:3000"
}

7
cypress.prod.config.ts Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from 'cypress'
export default defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 8000,
requestTimeout: 8000,
})

View File

@ -1,6 +0,0 @@
{
"baseUrl": "https://mutoe.github.io/vue3-realworld-example-app",
"chromeWebSecurity": false,
"defaultCommandTimeout": 8000,
"requestTimeout": 8000
}

View File

@ -6,13 +6,13 @@
"prepare": "husky install",
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"serve": "vite preview --port 4137",
"lint:script": "eslint \"{src/**/*.{ts,vue},cypress/**/*.js}\"",
"lint:tsc": "vue-tsc --noEmit",
"lint": "concurrently \"yarn build\" \"yarn lint:tsc\" \"yarn lint:script\"",
"test:unit": "jest",
"test:e2e": "yarn build && concurrently -rk -s first \"yarn serve\" \"cypress run -c baseUrl=http://localhost:5000\"",
"test:e2e:ci": "cypress run -C cypress.prod.json",
"test:e2e": "yarn build && concurrently -rk -s first \"yarn serve\" \"./node_modules/.bin/cypress run -c baseUrl=http://localhost:4137\"",
"test:e2e:ci": "./node_modules/.bin/cypress run -C cypress.prod.json",
"test": "yarn test:unit && yarn test:e2e"
},
"dependencies": {