Skip to content

Commit

Permalink
Do not make assumptions on cell structure
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGerleman committed Nov 23, 2021
1 parent 8cdaa82 commit 94c7285
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Libraries/Lists/__tests__/VirtualizedList-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1471,8 +1471,7 @@ it('keeps last focused item rendered', () => {
});

ReactTestRenderer.act(() => {
const cell3 = component.root.findByProps({value: 3});
cell3.parent.props.onFocusCapture(null);
component.getInstance()._onCellFocusCapture(3);
});

ReactTestRenderer.act(() => {
Expand All @@ -1484,8 +1483,7 @@ it('keeps last focused item rendered', () => {
expect(component).toMatchSnapshot();

ReactTestRenderer.act(() => {
const cell17 = component.root.findByProps({value: 17});
cell17.parent.props.onFocusCapture(null);
component.getInstance()._onCellFocusCapture(17);
});

// Cells 2-4 should no longer be rendered after focus is moved to the end of
Expand Down

0 comments on commit 94c7285

Please sign in to comment.