You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
TimelinePanel-test: Hackery to make it pass
This commit is contained in:
@ -296,11 +296,12 @@ describe('TimelinePanel', function() {
|
|||||||
// direction.
|
// direction.
|
||||||
setScrollTop(scrollingDiv.scrollHeight);
|
setScrollTop(scrollingDiv.scrollHeight);
|
||||||
scrollingDiv.scrollTop = scrollingDiv.scrollHeight;
|
scrollingDiv.scrollTop = scrollingDiv.scrollHeight;
|
||||||
return awaitScroll();
|
|
||||||
}).then(() => {
|
// the delay() below is a heinous hack to deal with the fact that,
|
||||||
expect(messagePanel.props.backPaginating).toBe(false);
|
// without it, we may or may not get control back before the
|
||||||
expect(messagePanel.props.forwardPaginating).toBe(true);
|
// forward pagination completes. The delay means that it should
|
||||||
return awaitScroll();
|
// have completed.
|
||||||
|
return awaitScroll().delay(0);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
expect(messagePanel.props.backPaginating).toBe(false);
|
expect(messagePanel.props.backPaginating).toBe(false);
|
||||||
expect(messagePanel.props.forwardPaginating).toBe(false);
|
expect(messagePanel.props.forwardPaginating).toBe(false);
|
||||||
|
Reference in New Issue
Block a user