fix(flutter): 精修首页 feed 交互与底色
This commit is contained in:
1 parent
435fbbbbb1
commit
321c62664c
17 files changed
+427
-448
No files matched your search
@@ -65,27 +65,29 @@ void main() {
|
||||
tester.widget<Text>(find.byKey(const Key('rail-comments-count'))).data,
|
||||
'3.2万',
|
||||
);
|
||||
expect(find.byKey(const Key('home-feed-refresh')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-feed-danmaku')), findsNothing);
|
||||
expect(find.byKey(const Key('home-feed-fullscreen')), findsNothing);
|
||||
expect(
|
||||
tester.widget<Scaffold>(find.byType(Scaffold).first).backgroundColor,
|
||||
Colors.black,
|
||||
);
|
||||
expect(tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('should_open_episode_sheet_from_full_series_bar', (tester) async {
|
||||
testWidgets('should_open_full_player_from_full_series_bar', (tester) async {
|
||||
await _pumpApp(tester);
|
||||
|
||||
await tester.tap(find.byKey(const Key('home-feed-full-series')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('player-episodes-sheet')), findsOneWidget);
|
||||
final player = tester.widget<PlayerPage>(find.byType(PlayerPage).last);
|
||||
expect(player.homeMode, isFalse);
|
||||
});
|
||||
|
||||
testWidgets('should_show_coming_soon_for_danmaku_and_anime_tab', (
|
||||
tester,
|
||||
) async {
|
||||
testWidgets('should_show_coming_soon_for_anime_tab', (tester) async {
|
||||
await _pumpApp(tester);
|
||||
|
||||
await tester.tap(find.byKey(const Key('home-feed-danmaku')));
|
||||
await tester.pump();
|
||||
expect(find.text('Coming soon'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('home-feed-tab-anime')));
|
||||
await tester.pump();
|
||||
expect(find.text('Coming soon'), findsOneWidget);
|
||||
|
||||
Reference in new issue
Block a user