From 5e08cb6d06f14c9de49c63b7d8f0b4a16b89cc75 Mon Sep 17 00:00:00 2001 From: Kevin Buhmann Date: Mon, 2 Dec 2024 19:18:11 -0600 Subject: [PATCH] chore(datagrid): fix virtual scroll PageDown/Page test --- .../datagrid/datagrid-virtual-scroll.directive.spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/angular/src/data/datagrid/datagrid-virtual-scroll.directive.spec.ts b/projects/angular/src/data/datagrid/datagrid-virtual-scroll.directive.spec.ts index c62f41653f..4f67ef876c 100644 --- a/projects/angular/src/data/datagrid/datagrid-virtual-scroll.directive.spec.ts +++ b/projects/angular/src/data/datagrid/datagrid-virtual-scroll.directive.spec.ts @@ -222,22 +222,19 @@ export default function (): void { expect(document.activeElement).toBe(headerCheckboxCell); grid.dispatchEvent(new KeyboardEvent('keydown', { code: 'PageDown' })); - // active checkbox input with ID clr-dg-row-cb364 - expect(document.activeElement).toBe(grid.querySelectorAll('[type=checkbox]')[22]); + expect(document.activeElement).toBe(grid.querySelectorAll('[type=checkbox]')[23]); grid.dispatchEvent(new KeyboardEvent('keydown', { code: 'PageDown' })); sleep(); fixture.whenStable(); fixture.whenRenderingDone(); - // active checkbox input with ID clr-dg-row-cb383 expect(document.activeElement).toBe(grid.querySelectorAll('[type=checkbox]')[41]); grid.dispatchEvent(new KeyboardEvent('keydown', { code: 'PageUp' })); sleep(); fixture.whenStable(); fixture.whenRenderingDone(); - // active checkbox input with ID clr-dg-row-cb360 - expect(document.activeElement).toBe(grid.querySelectorAll('[type=checkbox]')[19]); + expect(document.activeElement).toBe(grid.querySelectorAll('[type=checkbox]')[18]); flush(); flushMicrotasks();