From: Haoqun Jiang Date: Tue, 12 Jul 2022 10:19:58 +0000 (+0800) Subject: feat: import `main.css` in Cypress Component Testing page X-Git-Tag: v2.1.1~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7788e7c572a40225e0812c7fb59be8e291961c07;p=thirdparty%2Fvuejs%2Fcreate-vue.git feat: import `main.css` in Cypress Component Testing page so that the components mounted in the playground looks the same as when they are actually used in the app. --- diff --git a/template/config/cypress-ct/cypress/support/component.js b/template/config/cypress-ct/cypress/support/component.js index 3d1a3d22..f8f6407d 100644 --- a/template/config/cypress-ct/cypress/support/component.js +++ b/template/config/cypress-ct/cypress/support/component.js @@ -19,6 +19,9 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') +// Import global styles +import '@/main.css' + import { mount } from 'cypress/vue2' Cypress.Commands.add('mount', mount) diff --git a/template/config/cypress-ct/cypress/support/component.ts b/template/config/cypress-ct/cypress/support/component.ts index c56a294a..6a81b8f3 100644 --- a/template/config/cypress-ct/cypress/support/component.ts +++ b/template/config/cypress-ct/cypress/support/component.ts @@ -19,6 +19,9 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') +// Import global styles +import '@/main.css' + import { mount } from 'cypress/vue2' // Augment the Cypress namespace to include type definitions for