mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-06 06:41:56 +00:00
fix(web): harden older history loading
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
ConversationOutlinePanel,
|
||||
captureScrollAnchor,
|
||||
getHistoryCoverageRetryDelay,
|
||||
getPullToLoadState,
|
||||
getScrollIntent,
|
||||
hasAppliedHistoryVersion,
|
||||
locateOutlineTargetMessage,
|
||||
@@ -262,6 +263,13 @@ describe('top-triggered history loading', () => {
|
||||
expect(getHistoryCoverageRetryDelay(2_800, 1_000)).toBe(1_816)
|
||||
expect(getHistoryCoverageRetryDelay(900, 1_000)).toBe(16)
|
||||
})
|
||||
|
||||
it('shows pull feedback at 16px and arms release loading at 64px', () => {
|
||||
expect(getPullToLoadState(15)).toBe('idle')
|
||||
expect(getPullToLoadState(16)).toBe('pulling')
|
||||
expect(getPullToLoadState(63)).toBe('pulling')
|
||||
expect(getPullToLoadState(64)).toBe('ready')
|
||||
})
|
||||
})
|
||||
|
||||
describe('outline target loading', () => {
|
||||
|
||||
Reference in New Issue
Block a user