Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update Cypress to v10 #1632

Merged
merged 2 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>
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