feat(ui, core): deprecate pagination in favor of limit
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -508,4 +508,18 @@ void main() {
|
||||
)).called(1);
|
||||
},
|
||||
);
|
||||
|
||||
test('`widget.limit` should match `widget.pagination.limit`', () {
|
||||
const pagination = PaginationParams(limit: 30);
|
||||
final channelListCore = ChannelListCore(
|
||||
listBuilder: (_, __) => const Offstage(),
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
);
|
||||
|
||||
expect(channelListCore.limit, pagination.limit);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -551,4 +551,19 @@ void main() {
|
||||
)).called(1);
|
||||
},
|
||||
);
|
||||
|
||||
test('`widget.limit` should match `widget.pagination.limit`', () {
|
||||
const pagination = PaginationParams(limit: 30);
|
||||
final messageSearchListCore = MessageSearchListCore(
|
||||
childBuilder: (List<GetMessageResponse> messages) => const Offstage(),
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object? error) => const Offstage(),
|
||||
filters: testFilter,
|
||||
messageFilters: testMessageFilter,
|
||||
paginationParams: pagination,
|
||||
);
|
||||
|
||||
expect(messageSearchListCore.limit, pagination.limit);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -520,4 +520,17 @@ void main() {
|
||||
)).called(1);
|
||||
},
|
||||
);
|
||||
|
||||
test('`widget.limit` should match `widget.pagination.limit`', () {
|
||||
const pagination = PaginationParams(limit: 30);
|
||||
final userListCore = UserListCore(
|
||||
listBuilder: (_, __) => const Offstage(),
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
);
|
||||
|
||||
expect(userListCore.limit, pagination.limit);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user