From 6c59c1583c97eced206daf3b5b3cf61d8beb6d6b Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Tue, 19 Nov 2024 15:55:08 -0500 Subject: [PATCH] Fix tests --- tests/e2e/polyfill.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/polyfill.test.ts b/tests/e2e/polyfill.test.ts index d689cf4..81dc486 100644 --- a/tests/e2e/polyfill.test.ts +++ b/tests/e2e/polyfill.test.ts @@ -72,7 +72,7 @@ test('applies polyfill for `anchor()`', async ({ page }) => { await applyPolyfill(page); - await expect(target).toHaveCSS('top', `${parentHeight}px`); + await expectWithinOne(target, 'top', parentHeight); await expectWithinOne(target, 'right', expected); }); @@ -88,7 +88,7 @@ test('applies polyfill from inline styles', async ({ page }) => { await applyPolyfill(page); - await expect(targetInLine).toHaveCSS('top', `${parentHeight}px`); + await expectWithinOne(targetInLine, 'top', parentHeight); await expectWithinOne(targetInLine, 'right', expected); }); @@ -99,7 +99,7 @@ test('updates when sizes change', async ({ page }) => { const parentHeight = await getParentHeight(page, targetSelector); await applyPolyfill(page); - await expect(target).toHaveCSS('top', `${parentHeight}px`); + await expectWithinOne(target, 'top', parentHeight); await expectWithinOne(target, 'right', parentWidth - width); await page