Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('makes the first and last rows focusable but invisible', fakeAsync(() => {
const rows = component.getRows();
expect(component.hoverContentStateForRow(0)).toBe(HoverContentState.FOCUSABLE);
expect(component.hoverContentStateForRow(rows.length - 1))
.toBe(HoverContentState.FOCUSABLE);
}));
});
fakeAsync(() => {
expect(component.hoverContentStateForRow(1)).toBe(HoverContentState.OFF);
expect(component.hoverContentStateForRow(2)).toBe(HoverContentState.OFF);
expect(component.hoverContentStateForRow(3)).toBe(HoverContentState.OFF);
expect(component.hoverContentStateForRow(4)).toBe(HoverContentState.FOCUSABLE);
component.openLens(2);
tick(1);
expect(component.hoverContentStateForRow(2)).toBe(HoverContentState.ON);
expect(component.hoverContentStateForRow(1)).toBe(HoverContentState.FOCUSABLE);
expect(component.hoverContentStateForRow(3)).toBe(HoverContentState.FOCUSABLE);
component.focusEditCell(4);
tick(1);
expect(component.hoverContentStateForRow(2)).toBe(HoverContentState.OFF);
expect(component.hoverContentStateForRow(4)).toBe(HoverContentState.ON);
expect(component.hoverContentStateForRow(3)).toBe(HoverContentState.FOCUSABLE);
}));
});