MCPcopy Create free account
hub / github.com/angular/components / assertStickyOffsets

Function assertStickyOffsets

src/cdk/table/table.spec.ts:2093–2096  ·  view source on GitHub ↗
(position: number)

Source from the content-addressed store, hash-verified

2091 it('should update the position of sticky cells as the user is scrolling', async () => {
2092 const {fixture, table} = await createVirtualScroll(TableWithVirtualScroll);
2093 const assertStickyOffsets = (position: number) => {
2094 getHeaderCells(table).forEach(cell => expect(cell.style.top).toBe(`${position * -1}px`));
2095 getFooterCells(table).forEach(cell => expect(cell.style.bottom).toBe(`${position}px`));
2096 };
2097
2098 assertStickyOffsets(0);
2099 await triggerScroll(fixture, 1000);

Callers 1

table.spec.tsFile · 0.85

Calls 2

getHeaderCellsFunction · 0.70
getFooterCellsFunction · 0.70

Tested by

no test coverage detected