fix(home): 优化二级标签选中样式
This commit is contained in:
1 parent
5da836dded
commit
1adcc16727
4 files changed
+29
-11
No files matched your search
@@ -157,6 +157,10 @@ void main() {
|
||||
expect(primaryGap, closeTo(AppDimens.homePrimaryCategoryGap, 0.1));
|
||||
final tagStart = tester.getTopLeft(find.text('Hot'));
|
||||
expect(tagStart.dx, pageStart.dx);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-tag-hot'))).height,
|
||||
AppDimens.homeSecondaryTagHeight,
|
||||
);
|
||||
final tagGap =
|
||||
tester.getTopLeft(find.text('Uplifting')).dx -
|
||||
tester.getBottomRight(find.text('Hot')).dx;
|
||||
@@ -173,6 +177,14 @@ void main() {
|
||||
(selectedTagChip.decoration! as BoxDecoration).color,
|
||||
AppColors.contentSurface,
|
||||
);
|
||||
expect(
|
||||
(selectedTagChip.decoration! as BoxDecoration).borderRadius,
|
||||
BorderRadius.circular(AppDimens.homeSecondaryTagRadius),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-tag-hot'))).height,
|
||||
AppDimens.homeSecondaryTagHeight,
|
||||
);
|
||||
final selectedTag = tester.widget<Text>(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('home-tag-hot')),
|
||||
@@ -180,7 +192,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
expect(selectedTag.style?.color, AppColors.navSelected);
|
||||
expect(selectedTag.style?.fontWeight, FontWeight.w700);
|
||||
expect(selectedTag.style?.fontWeight, FontWeight.w600);
|
||||
expect(find.byType(PageView), findsNothing);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user