fix(flutter): 首页 feed 静默刷新与进度条细节

This commit is contained in:
Zhou Weidong committed 2026-10-20 14:11:42 +08:00
1 parent a3126723d2
commit 82fe237c24
8 files changed
+190 -17

No files matched your search

+26
View File
@@ -96,6 +96,32 @@ void main() {
expect(find.text('Coming soon'), findsOneWidget);
});
testWidgets('should_refresh_feed_without_blank_loading', (tester) async {
await _pumpApp(tester);
await tester.tap(find.byKey(const Key('home-feed-refresh')));
await tester.pump();
expect(find.byType(CircularProgressIndicator), findsNothing);
expect(find.byKey(const Key('home-feed-title')), findsOneWidget);
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-feed-title')), findsOneWidget);
});
testWidgets('should_keep_feed_rail_above_bottom_panels', (tester) async {
await _pumpApp(tester);
final railTop = tester.getCenter(find.byKey(const Key('rail-save'))).dy;
final railBottom = tester
.getRect(find.byKey(const Key('rail-share')))
.bottom;
final infoTop = tester
.getRect(find.byKey(const Key('home-feed-series-meta')))
.top;
expect(railTop, greaterThan(844 * 0.35));
expect(railBottom, lessThanOrEqualTo(infoTop));
});
testWidgets('should_restore_light_theme_after_leaving_feed_tab', (
tester,
) async {