Skip to content

Commit bc8b720

Browse files
committed
fix(angular): correctly move tolerance in angular spec
1 parent a548195 commit bc8b720

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/angular-virtual/e2e/app/test/scroll.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ test('scrolls to index 1000', async ({ page }) => {
2828
await expect(page.locator('[data-testid="item-1000"]')).toBeVisible()
2929

3030
const delta = await page.evaluate(check)
31-
expect(delta).toBeLessThan(1.01)
31+
// Angular layout/scroll alignment needs a slightly higher tolerance than React.
32+
expect(delta).toBeLessThan(4.5)
3233
})
3334

3435
test('scrolls to last item', async ({ page }) => {

packages/react-virtual/e2e/app/test/scroll.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('scrolls to index 1000', async ({ page }) => {
2828
await expect(page.locator('[data-testid="item-1000"]')).toBeVisible()
2929

3030
const delta = await page.evaluate(check)
31-
expect(delta).toBeLessThan(4.5) // Angular needs a higher tolerance
31+
expect(delta).toBeLessThan(1.01)
3232
})
3333

3434
test('scrolls to last item', async ({ page }) => {

0 commit comments

Comments
 (0)