feat(ui): 更新品牌启动页与选集交互
This commit is contained in:
1 parent
4778ce2c75
commit
c1cb7d1c11
87 files changed
+919
-552
No files matched your search
@@ -148,6 +148,15 @@ void main() {
|
||||
|
||||
expect(find.byKey(const Key('home-all-dramas-title')), findsNothing);
|
||||
expect(find.text('No matching dramas.'), findsOneWidget);
|
||||
final content = tester.getCenter(
|
||||
find.byKey(const Key('empty-state-content')),
|
||||
);
|
||||
final chipsBottom = tester
|
||||
.getBottomLeft(find.byKey(const Key('home-category-chips')))
|
||||
.dy;
|
||||
final feed = tester.getRect(find.byType(CustomScrollView));
|
||||
expect(content.dx, closeTo(feed.center.dx, 1));
|
||||
expect(content.dy, closeTo((chipsBottom + feed.bottom) / 2, 36));
|
||||
|
||||
await tester.tap(find.text('Romance'));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -168,6 +177,10 @@ void main() {
|
||||
expect(find.byKey(const Key('home-all-dramas-title')), findsNothing);
|
||||
expect(find.text('Categories could not be loaded.'), findsOneWidget);
|
||||
expect(find.text('Retry'), findsOneWidget);
|
||||
expect(find.byKey(const Key('empty-state-icon')), findsOneWidget);
|
||||
final icon = tester.getCenter(find.byKey(const Key('empty-state-icon')));
|
||||
final feed = tester.getRect(find.byType(CustomScrollView));
|
||||
expect(icon.dx, closeTo(feed.center.dx, 1));
|
||||
expect(find.byKey(const Key('home-all-dramas-grid')), findsNothing);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user