From 05bf77889e1d19c86cb0b342f28e517faf83988d Mon Sep 17 00:00:00 2001 From: Ole Christer Selvig Date: Fri, 18 Aug 2023 14:29:21 +0200 Subject: [PATCH] fix(test-html): remove css files --- .../core-datepicker/core-datepicker.spec.css | 0 packages/core-progress/core-progress.spec.css | 20 ---------------- .../core-progress/core-progress.spec.html | 1 - packages/core-progress/core-progress.spec.ts | 24 +++++++++++++++++++ packages/core-tabs/core-tabs.spec.css | 4 ---- packages/core-tabs/core-tabs.spec.html | 1 - packages/core-tabs/core-tabs.spec.ts | 5 ++++ 7 files changed, 29 insertions(+), 26 deletions(-) delete mode 100644 packages/core-datepicker/core-datepicker.spec.css delete mode 100644 packages/core-progress/core-progress.spec.css delete mode 100644 packages/core-tabs/core-tabs.spec.css diff --git a/packages/core-datepicker/core-datepicker.spec.css b/packages/core-datepicker/core-datepicker.spec.css deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/core-progress/core-progress.spec.css b/packages/core-progress/core-progress.spec.css deleted file mode 100644 index ce9f2984..00000000 --- a/packages/core-progress/core-progress.spec.css +++ /dev/null @@ -1,20 +0,0 @@ -.my-track { - display: block; - background: #ccc; - border-radius: 3px; - overflow: hidden; - font: 700 12px/1 sans-serif; -} - -.my-track [value] { - background: #16f; - color: #fff; - padding: 3px 6px; - transition: 1s; -} - -.my-radial { - color: #16f; - stroke: #ccc; - transition: stroke-dashoffset 1s; -} diff --git a/packages/core-progress/core-progress.spec.html b/packages/core-progress/core-progress.spec.html index d653ff4e..05bc3a43 100644 --- a/packages/core-progress/core-progress.spec.html +++ b/packages/core-progress/core-progress.spec.html @@ -4,7 +4,6 @@ Core Progress Test Page - diff --git a/packages/core-progress/core-progress.spec.ts b/packages/core-progress/core-progress.spec.ts index 63462433..a33cc44b 100644 --- a/packages/core-progress/core-progress.spec.ts +++ b/packages/core-progress/core-progress.spec.ts @@ -1,10 +1,34 @@ import { test, expect, Locator } from '@playwright/test'; +const defaultStyle = ` + .my-track { + display: block; + background: #ccc; + border-radius: 3px; + overflow: hidden; + font: 700 12px/1 sans-serif; + } + + .my-track [value] { + background: #16f; + color: #fff; + padding: 3px 6px; + transition: 1s; + } + + .my-radial { + color: #16f; + stroke: #ccc; + transition: stroke-dashoffset 1s; + } +` + test.describe('core-progress', () => { let coreProgress: Locator test.beforeEach(async ({ page }) => { await page.goto('./core-progress/core-progress.spec.html') + await page.addStyleTag({ content: defaultStyle }) coreProgress = page.getByTestId('core-progress') }) diff --git a/packages/core-tabs/core-tabs.spec.css b/packages/core-tabs/core-tabs.spec.css deleted file mode 100644 index 9c8788dd..00000000 --- a/packages/core-tabs/core-tabs.spec.css +++ /dev/null @@ -1,4 +0,0 @@ - -div[hidden] { - display: none; -} diff --git a/packages/core-tabs/core-tabs.spec.html b/packages/core-tabs/core-tabs.spec.html index a14facb7..1940a005 100644 --- a/packages/core-tabs/core-tabs.spec.html +++ b/packages/core-tabs/core-tabs.spec.html @@ -5,7 +5,6 @@ Core Tab Test Environment - diff --git a/packages/core-tabs/core-tabs.spec.ts b/packages/core-tabs/core-tabs.spec.ts index 0cdefa3f..6ca8c29b 100644 --- a/packages/core-tabs/core-tabs.spec.ts +++ b/packages/core-tabs/core-tabs.spec.ts @@ -10,6 +10,11 @@ test.describe('core-tabs', () => { toggleEvents = 0 await page.exposeFunction(INCREMENT_TOGGLE_EVENTS_FUNC, incrementToggleEvents) await page.goto(`./core-tabs/core-tabs.spec.html`) + await page.addStyleTag({ content: ` + div[hidden] { + display: none; + } + `}) coreTabs = page.locator('core-tabs') })