From 732547cebf8f8489d0355c088bbdbf78cb1b781c Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Tue, 12 Jul 2022 18:19:58 +0800 Subject: [PATCH] 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. --- template/config/cypress-ct/cypress/support/component.js | 3 +++ template/config/cypress-ct/cypress/support/component.ts | 3 +++ 2 files changed, 6 insertions(+) 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 -- 2.39.5