()
| 62 | const ROW_COUNT = 100; |
| 63 | |
| 64 | function setup() { |
| 65 | const windowScroll = mockWindowScroll({ height: 100, width: 50 }); |
| 66 | |
| 67 | mockLayout((element) => { |
| 68 | if (element === document.documentElement) { |
| 69 | return { |
| 70 | height: 100, |
| 71 | left: 0, |
| 72 | scrollHeight: LIST_PAGE_TOP + ROW_HEIGHT * ROW_COUNT, |
| 73 | top: 0, |
| 74 | width: 50 |
| 75 | }; |
| 76 | } |
| 77 | if (element.getAttribute("role") === "list") { |
| 78 | return { |
| 79 | height: ROW_HEIGHT * ROW_COUNT, |
| 80 | left: 0, |
| 81 | top: LIST_PAGE_TOP - windowScroll.position.y, |
| 82 | width: 50 |
| 83 | }; |
| 84 | } |
| 85 | }); |
| 86 | |
| 87 | return windowScroll; |
| 88 | } |
| 89 | |
| 90 | test("should render the rows visible within the window", () => { |
| 91 | const windowScroll = setup(); |
no test coverage detected