feat(app): 客户端展示多语言并支持筛选分页

This commit is contained in:
Zhou Weidong committed 2026-10-24 17:20:24 +08:00
1 parent 8481611372
commit 8b50b5bd06
68 files changed
+2742 -1120

No files matched your search

+8 -11
View File
@@ -87,10 +87,7 @@ void main() {
expect(delegate.crossAxisCount, 3);
expect(delegate.crossAxisSpacing, AppDimens.homeGridGap);
expect(delegate.mainAxisSpacing, AppDimens.homeGridRowGap);
expect(find.byKey(const Key('home-section-featured')), findsOneWidget);
expect(find.byKey(const Key('home-section-new')), findsOneWidget);
expect(find.byKey(const Key('home-section-categories')), findsOneWidget);
expect(find.byKey(const Key('home-section-ranking')), findsOneWidget);
expect(find.byKey(const Key('home-section-featured')), findsNothing);
expect(find.byKey(const Key('home-section-category-古装')), findsOneWidget);
expect(find.byKey(const Key('home-section-category-社群')), findsOneWidget);
expect(find.byKey(const Key('home-secondary-tags')), findsNothing);
@@ -111,10 +108,10 @@ void main() {
expect(placeholder.style?.fontSize, AppDimens.searchPlaceholderFont);
expect(placeholder.style?.color, AppColors.textSecondary);
final selectedPrimary = tester.widget<AnimatedDefaultTextStyle>(
find.byKey(const Key('home-primary-label-featured')),
find.byKey(const Key('home-primary-label-costume')),
);
final unselectedPrimary = tester.widget<AnimatedDefaultTextStyle>(
find.byKey(const Key('home-primary-label-newReleases')),
find.byKey(const Key('home-primary-label-community')),
);
expect(
selectedPrimary.style.fontSize,
@@ -128,19 +125,19 @@ void main() {
expect(unselectedPrimary.style.color, AppColors.textTabInactive);
expect(
find.descendant(
of: find.byKey(const Key('home-section-featured')),
of: find.byKey(const Key('home-section-category-古装')),
matching: find.byType(Container),
),
findsNothing,
);
final primaryStart = tester.getTopLeft(find.text('Featured'));
final primaryStart = tester.getTopLeft(find.text('古装'));
final pageStart = tester.getTopLeft(searchBox);
expect(primaryStart.dx, pageStart.dx);
final primaryGap =
tester.getTopLeft(find.text('New')).dx -
tester.getBottomRight(find.text('Featured')).dx;
tester.getTopLeft(find.text('社群')).dx -
tester.getBottomRight(find.text('古装')).dx;
expect(primaryGap, closeTo(AppDimens.homePrimaryCategoryGap, 0.1));
expect(find.byType(PageView), findsNothing);
expect(find.byKey(const Key('home-primary-page-view')), findsOneWidget);
expect(tester.takeException(), isNull);
});