From 7788e7c572a40225e0812c7fb59be8e291961c07 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 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 -- 2.47.3