From c018489f34dd651a471e56e2d8df597079730cd2 Mon Sep 17 00:00:00 2001 From: Dharmen Shah Date: Sun, 23 Jun 2024 08:44:08 +0000 Subject: [PATCH] chore: fixes for cypress --- cypress.config.ts | 14 ++++++++++---- cypress/plugins/index.js | 21 +++++++++++++++++++++ cypress/tsconfig.json | 8 ++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 cypress/plugins/index.js create mode 100644 cypress/tsconfig.json diff --git a/cypress.config.ts b/cypress.config.ts index 45cb1dc..fa723c3 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -1,11 +1,17 @@ -import { defineConfig } from 'cypress' +import { defineConfig } from 'cypress'; export default defineConfig({ + video: false, component: { + // 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); + }, devServer: { framework: 'angular', - bundler: 'webpack', + bundler: 'webpack' }, - specPattern: '**/*.cy.ts', + excludeSpecPattern: '**/examples/*.spec.js', }, -}) \ No newline at end of file +}); \ No newline at end of file diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 0000000..60f08ca --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,21 @@ +/// +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +/** + * @type {Cypress.PluginConfig} + */ +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config + }; \ No newline at end of file diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 0000000..15353f2 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress"] + }, + "include": ["**/*.ts"] + } \ No newline at end of file