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: v3.2.3~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=732547cebf8f8489d0355c088bbdbf78cb1b781c;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 b234fad4..71041405 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/vue' 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 74ae3ea3..ab8aab11 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/vue' // Augment the Cypress namespace to include type definitions for