Skip to content

Commit 7ca2833

Browse files
Add UI test
1 parent 3e80b3f commit 7ca2833

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/tailwindcss/tests/ui.spec.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,35 @@ test('inset shadow colors', async ({ page }) => {
410410
)
411411
})
412412

413+
test('filter', async ({ page }) => {
414+
let { getPropertyValue } = await render(
415+
page,
416+
html`
417+
<div
418+
id="a"
419+
class="blur-md brightness-50 contrast-50 drop-shadow-md grayscale hue-rotate-180 invert saturate-50 sepia"
420+
>
421+
<div id="b" class="contrast-100"></div>
422+
</div>
423+
`,
424+
)
425+
426+
expect(await getPropertyValue('#a', 'filter')).toEqual(
427+
[
428+
'blur(12px)',
429+
'brightness(0.5)',
430+
'contrast(0.5)',
431+
'grayscale(1)',
432+
'hue-rotate(180deg)',
433+
'invert(1)',
434+
'saturate(0.5)',
435+
'sepia(1)',
436+
'drop-shadow(rgba(0, 0, 0, 0.12) 0px 3px 3px)',
437+
].join(' '),
438+
)
439+
expect(await getPropertyValue('#b', 'filter')).toEqual('contrast(1)')
440+
})
441+
413442
test('outline style is optional', async ({ page }) => {
414443
let { getPropertyValue } = await render(
415444
page,

0 commit comments

Comments
 (0)