diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..58835b53a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "msedge", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:5000", + "webRoot": "${workspaceFolder}" + } + ] +} diff --git a/cypress.config.js b/cypress.config.js index 1221dcc63..c8c62c8fa 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -22,6 +22,8 @@ module.exports = defineConfig({ }, component: { + indexHtmlFile: 'test/cypress/support/component-index.html', + supportFile: 'test/cypress/support/component.js', specPattern: 'test/cypress/components/**/*.spec.js', devServer: { framework: 'vue', diff --git a/cypress/support/commands.js b/cypress/support/commands.js deleted file mode 100644 index d5040ee1b..000000000 --- a/cypress/support/commands.js +++ /dev/null @@ -1,57 +0,0 @@ -import { mount } from 'cypress/vue'; -import { Quasar } from 'quasar'; -import { i18n } from 'src/boot/i18n'; -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -import { createTestingPinia } from '@pinia/testing'; -import { shallowMount } from '@vue/test-utils'; -const pinia = createTestingPinia({ createSpy: () => {}, stubActions: false }); - -Cypress.Commands.add('vnMount', (component, options = {}) => { - const globalConfig = { - global: { - stubs: ['router-view', 'vue-i18n'], - plugins: [Quasar, i18n, pinia], - mocks: { t: (key) => key }, - }, - }; - // options.global = options.global || {}; - // options.global.stubs = options.global.stubs || {}; - // options.global.stubs.transition = false; - // options.global.components = options.global.components || {}; - // options.global.plugins = options.global.plugins || []; - - // Use store passed in from options, or initialize a new one - // const { /* store = getStore(), */ ...mountOptions } = options; - - // Add plugins here - // options.global.plugins.push({ - // install(app) { - // app.use(i18n); - // }, - // }); - return shallowMount(component, { ...globalConfig, ...options }); -}); diff --git a/cypress/support/component-index.html b/cypress/support/component-index.html deleted file mode 100644 index ac6e79fd8..000000000 --- a/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - -
- - - -