-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove outdated tests and add new global extends test for improved fu…
…nctionality
- Loading branch information
Showing
3 changed files
with
28 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { test, expect } from '@playwright/test' | ||
import { dirname, resolve } from 'path' | ||
import { fileURLToPath } from 'url' | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = dirname(__filename) | ||
|
||
test('extends', async ({ page }) => { | ||
await page.evaluate(() => { | ||
globalThis.masterCSSConfigs = [{ | ||
variables: { | ||
primary: '#000000' | ||
} | ||
}] | ||
globalThis.masterCSSConfig = { | ||
extends: [{ | ||
variables: { | ||
secondary: '#ffffff' | ||
} | ||
}] | ||
} | ||
}) | ||
await page.addScriptTag({ path: resolve(__dirname, '../dist/global.min.js') }) | ||
expect(await page.evaluate(() => globalThis.masterCSSConfigs)).toBeDefined() | ||
expect(await page.evaluate(() => globalThis.runtimeCSS.variables.primary)).toBeDefined() | ||
expect(await page.evaluate(() => globalThis.runtimeCSS.variables.secondary)).toBeDefined() | ||
expect(await page.evaluate(() => globalThis.runtimeCSS.customConfig.extends?.length)).toBe(2) | ||
}) |
This file was deleted.
Oops, something went wrong.