diff --git a/cypress/plugins/index.js b/cypress/plugins/index.ts
similarity index 56%
rename from cypress/plugins/index.js
rename to cypress/plugins/index.ts
index aa9918d21..e158cbbd8 100644
--- a/cypress/plugins/index.js
+++ b/cypress/plugins/index.ts
@@ -1,4 +1,3 @@
-///
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
@@ -12,10 +11,21 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
+import path from 'path'
+import { startDevServer } from '@cypress/vite-dev-server'
+
/**
* @type {Cypress.PluginConfig}
*/
-module.exports = (on, config) => {
- // `on` is used to hook into various events Cypress emits
- // `config` is the resolved Cypress config
+export default (on, config) => {
+ // `on` is used to hook into various events Cypress emits
+ // `config` is the resolved Cypress config
+ on('dev-server:start', (options) => {
+ return startDevServer({
+ options,
+ viteConfig: {
+ configFile: path.resolve(__dirname, '..', '..', 'vite.config.ts'),
+ },
+ })
+ })
}
diff --git a/cypress/plugins/tsconfig.json b/cypress/plugins/tsconfig.json
new file mode 100644
index 000000000..a164a2264
--- /dev/null
+++ b/cypress/plugins/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "@vue/tsconfig/tsconfig.node.json",
+ "include": ["./**/*"],
+ "compilerOptions": {
+ "module": "CommonJS",
+ "preserveValueImports": false,
+ "types": ["node", "cypress/types/cypress"]
+ }
+}
\ No newline at end of file
diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json
new file mode 100644
index 000000000..e0f01636c
--- /dev/null
+++ b/cypress/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "@vue/tsconfig/tsconfig.web.json",
+ "include": ["./integration/**/*", "./support/**/*"],
+ "compilerOptions": {
+ "isolatedModules": false,
+ "target": "es5",
+ "lib": ["es5", "dom"],
+ "types": ["cypress"]
+ }
+}
\ No newline at end of file
diff --git a/env.d.ts b/env.d.ts
index 8cee15171..2d7de3f6a 100644
--- a/env.d.ts
+++ b/env.d.ts
@@ -1,2 +1,3 @@
///
///
+///
\ No newline at end of file
diff --git a/package.json b/package.json
index 1b9f581d8..e2ae9bcf5 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,8 @@
},
"devDependencies": {
"@4tw/cypress-drag-drop": "2.2.1",
+ "@cypress/vite-dev-server": "2.2.2",
+ "@cypress/vue": "3.1.1",
"@faker-js/faker": "7.3.0",
"@fortawesome/fontawesome-svg-core": "6.1.1",
"@fortawesome/free-regular-svg-icons": "6.1.1",
diff --git a/yarn.lock b/yarn.lock
index b70eace35..93ff34394 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1071,6 +1071,11 @@
resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.1.tgz#b6b8d81780b9a9f6459f4bfe9226ac6aefaefe87"
integrity sha512-aG20vknL4/YjQF9BSV7ts4EWm/yrjagAN7OWBNmlbEOUiu0llj4OGrFoOKK3g2vey4/p2omKCoHrWtPxSwV3HA==
+"@cypress/mount-utils@1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@cypress/mount-utils/-/mount-utils-1.0.2.tgz#afbc4f8c350b7cd86edc5ad0db0cbe1e0181edc8"
+ integrity sha512-Fn3fdTiyayHoy8Ol0RSu4MlBH2maQ2ZEXeEVKl/zHHXEQpld5HX3vdNLhK5YLij8cLynA4DxOT/nO9iEnIiOXw==
+
"@cypress/request@^2.88.10":
version "2.88.10"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce"
@@ -1095,6 +1100,22 @@
tunnel-agent "^0.6.0"
uuid "^8.3.2"
+"@cypress/vite-dev-server@2.2.2":
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/@cypress/vite-dev-server/-/vite-dev-server-2.2.2.tgz#dd16b7470ddd1ff095678b61c56da52ac02f44ed"
+ integrity sha512-02y/Fm0N+CQjKbSjjRtktPgPbp91kOvtc8+WW2l2odIYQkKlG6IOCpmgc898muW0lBAcCszdEIHR/ItdZDiYPw==
+ dependencies:
+ debug "^4.3.2"
+ get-port "^5.1.1"
+
+"@cypress/vue@3.1.1":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@cypress/vue/-/vue-3.1.1.tgz#0e6b4a1cb972d2f271ba05209c55e9101a96d0a4"
+ integrity sha512-wD1vunuPFPLC8FZtgwdq+mcSEOs27qquuJJdGcY8aAN0y38rqYuuaj+N4UxKoAjhkSwthaOeZehjBtvDvv9C6w==
+ dependencies:
+ "@cypress/mount-utils" "1.0.2"
+ "@vue/test-utils" "^2.0.0-rc.10"
+
"@cypress/xvfb@^1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a"
@@ -2853,6 +2874,11 @@
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.0.0-rc.18.tgz#ff22b252424fe72e5462cbb3a8e7405cef11ffb6"
integrity sha512-aifolXjVdsogjaLmDoZ0FU8vN+R67aWmg9OuVeED4w5Ij5GFQLrlhM19uhWe/r5xXUL4fXMk3pX5wW6FJP1NcQ==
+"@vue/test-utils@^2.0.0-rc.10":
+ version "2.0.0-rc.17"
+ resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.0.0-rc.17.tgz#e6dcf5b5bd3ae23595bdb154b9b578ebcdffd698"
+ integrity sha512-7LHZKsFRV/HqDoMVY+cJamFzgHgsrmQFalROHC5FMWrzPzd+utG5e11krj1tVsnxYufGA2ABShX4nlcHXED+zQ==
+
"@vue/tsconfig@0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@vue/tsconfig/-/tsconfig-0.1.3.tgz#4a61dbd29783d01ddab504276dcf0c2b6988654f"
@@ -6594,7 +6620,7 @@ get-port@^3.1.0:
resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=
-get-port@^5.1.0:
+get-port@^5.1.0, get-port@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==