Skip to content

Commit

Permalink
test: update Cypress to v10
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Jul 12, 2022
1 parent 7fa1c44 commit 11c68e8
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 123 deletions.
16 changes: 16 additions & 0 deletions packages/ui/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'cypress'
import { resolve } from 'pathe'

export default defineConfig({
fixturesFolder: false,
component: {
specPattern: 'client/**/*.cy.{js,ts,jsx,tsx}',
devServer: {
framework: 'vue',
bundler: 'vite',
viteConfig: {
configFile: resolve('./cypress/vite.config.ts'),
},
},
},
})
7 changes: 0 additions & 7 deletions packages/ui/cypress.json

This file was deleted.

15 changes: 0 additions & 15 deletions packages/ui/cypress/plugins/index.ts

This file was deleted.

12 changes: 12 additions & 0 deletions packages/ui/cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/ui/cypress/support/mount.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mount } from '@cypress/vue'
import { mount } from 'cypress/vue'
import type { Component } from 'vue'
import { directives, plugins } from '../../client/global-setup'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { config } from '../../vite.config'
import { config } from '../vite.config'

config.plugins?.push(vueJsx())
config.server = { fs: { allow: ['../..'] } }

export default defineConfig(config)
8 changes: 3 additions & 5 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
"dev:client": "vite",
"dev": "rollup -c --watch --watch.include=node/**",
"dev:ui": "run-p dev dev:client",
"test:run": "cypress run-ct",
"test:open": "cypress open-ct",
"test:run": "cypress run --component",
"test:open": "cypress open --component",
"prepublishOnly": "pnpm build"
},
"dependencies": {
"sirv": "^2.0.2"
},
"devDependencies": {
"@cypress/vite-dev-server": "^2.2.3",
"@cypress/vue": "^3.1.2",
"@faker-js/faker": "^7.3.0",
"@testing-library/cypress": "^8.0.3",
"@types/codemirror": "^5.60.5",
Expand All @@ -55,7 +53,7 @@
"birpc": "^0.2.3",
"codemirror": "^5.65.6",
"codemirror-theme-vars": "^0.1.1",
"cypress": "^9.7.0",
"cypress": "^10.3.0",
"d3-graph-controller": "^2.2.43",
"flatted": "^3.2.5",
"floating-vue": "^2.0.0-y.0",
Expand Down

0 comments on commit 11c68e8

Please sign in to comment.