Skip to content

Commit acf8866

Browse files
committed
Add UI tests
1 parent c6c81d3 commit acf8866

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

packages/tailwindcss/tests/ui.spec.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,43 @@ test('filter', async ({ page }) => {
18261826
expect(await getPropertyValue('#b', 'filter')).toEqual('contrast(1)')
18271827
})
18281828

1829+
test('drop shadow colors', async ({ page }) => {
1830+
let { getPropertyList } = await render(
1831+
page,
1832+
html`
1833+
<div id="a" class="drop-shadow-md"></div>
1834+
<div id="b" class="drop-shadow-md drop-shadow-red"></div>
1835+
<div id="c" class="drop-shadow-md/50"></div>
1836+
<div id="d" class="drop-shadow-md/50 drop-shadow-red"></div>
1837+
<div id="e" class="drop-shadow-md/50 drop-shadow-red/50"></div>
1838+
`,
1839+
)
1840+
1841+
expect(await getPropertyList('#a', 'filter')).toEqual([
1842+
'drop-shadow(rgba(0, 0, 0, 0.12) 0px 3px 3px)',
1843+
])
1844+
1845+
expect(await getPropertyList('#b', 'filter')).toEqual([
1846+
expect.stringMatching(/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+\) 0px 3px 3px\)/),
1847+
])
1848+
1849+
expect(await getPropertyList('#c', 'filter')).toEqual([
1850+
'drop-shadow(oklab(0 0 0 / 0.5) 0px 3px 3px)',
1851+
])
1852+
1853+
expect(await getPropertyList('#d', 'filter')).toEqual([
1854+
expect.stringMatching(
1855+
/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+ \/ 0\.5\) 0px 3px 3px\)/,
1856+
),
1857+
])
1858+
1859+
expect(await getPropertyList('#e', 'filter')).toEqual([
1860+
expect.stringMatching(
1861+
/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+ \/ 0\.25\) 0px 3px 3px\)/,
1862+
),
1863+
])
1864+
})
1865+
18291866
test('outline style is optional', async ({ page }) => {
18301867
let { getPropertyValue } = await render(
18311868
page,

0 commit comments

Comments
 (0)