Skip to content

Write tests for msglist widgets handling middle of history #1569

@gnprice

Description

@gnprice

This is a follow-up to #82. For the launch we'll be shipping an implementation (from #1566) that doesn't yet have tests, in the interest of timeliness. It'll be good to follow up by writing those tests.

This issue is for one swath of those tests, corresponding to a segment of the commits. Tests for the other commits are tracked in:

To see which tests are needed, grep for comments with TODO(#1569).

Here's also a description of the tests needed, in terms of a draft version of #1566.

056e024 wip msglist: Call fetchNewer when near bottom; TODO test

TODO test: call even if also near top
(because may have haveOldest true but haveNewest false)

lib/widgets/message_list.dart | 3 +++
1 file changed, 3 insertions(+)

1af88a0 wip msglist: Show loading indicator at bottom as well as top; TODO test

lib/widgets/message_list.dart | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)

7ac1759 wip msglist test: Start on widget tests of end-cap; TODO check lack of newest hides typing-status and mark-as-read; TODO revisit realism of data

test/widgets/message_list_test.dart | 67 +++++++++++++++++++++++++++++++++++----
1 file changed, 61 insertions(+), 6 deletions(-)

bbb6704 wip msglist: Accept anchor on MessageListPage; TODO test

TODO test: on jump and then new store, preserve jumped anchor
(rather than reset to original anchor)

lib/widgets/message_list.dart | 39 ++++++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 11 deletions(-)

5395f48 wip msglist: Jump, not scroll, to end when it might be far; TODO test

lib/model/message_list.dart | 16 +++++++++++++++-
lib/widgets/message_list.dart | 35 ++++++++++++++++++++++++++++++++---
2 files changed, 47 insertions(+), 4 deletions(-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-msglistThe message-list screen, except what's label:a-contenta-tests

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions