feat(ui): 更新品牌启动页与选集交互
This commit is contained in:
1 parent
4778ce2c75
commit
c1cb7d1c11
87 files changed
+919
-552
No files matched your search
@@ -22,34 +22,19 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('empty-state-art')), findsOneWidget);
|
||||
expect(find.byKey(const Key('empty-state-art-inner')), findsOneWidget);
|
||||
expect(find.byKey(const Key('empty-state-art')), findsNothing);
|
||||
expect(find.byKey(const Key('empty-state-art-inner')), findsNothing);
|
||||
expect(find.byKey(const Key('empty-state-icon')), findsOneWidget);
|
||||
expect(find.text('No stories'), findsOneWidget);
|
||||
expect(find.text('New content will appear here.'), findsOneWidget);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-art'))),
|
||||
const Size(84, 84),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-art-inner'))),
|
||||
const Size(56, 56),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-icon'))),
|
||||
const Size(27, 27),
|
||||
const Size(48, 48),
|
||||
);
|
||||
final outer = tester.widget<Container>(
|
||||
find.byKey(const Key('empty-state-art')),
|
||||
expect(
|
||||
tester.widget<Icon>(find.byKey(const Key('empty-state-icon'))).color,
|
||||
AppColors.gold,
|
||||
);
|
||||
final outerDecoration = outer.decoration! as BoxDecoration;
|
||||
expect(outerDecoration.shape, BoxShape.circle);
|
||||
expect(outerDecoration.color?.a, closeTo(0.055, 0.001));
|
||||
expect(outerDecoration.border!.top.color.a, closeTo(0.11, 0.001));
|
||||
final inner = tester.widget<Container>(
|
||||
find.byKey(const Key('empty-state-art-inner')),
|
||||
);
|
||||
expect((inner.decoration! as BoxDecoration).color?.a, closeTo(0.11, 0.001));
|
||||
expect(
|
||||
tester
|
||||
.widget<Padding>(find.byKey(const Key('empty-state-padding')))
|
||||
@@ -97,18 +82,11 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-art'))),
|
||||
const Size(60, 60),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-art-inner'))),
|
||||
const Size(40, 40),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('empty-state-icon'))),
|
||||
const Size(21, 21),
|
||||
const Size(32, 32),
|
||||
);
|
||||
expect(find.byType(DecoratedBox), findsNothing);
|
||||
expect(
|
||||
tester
|
||||
.widget<Text>(find.byKey(const Key('empty-state-title')))
|
||||
@@ -125,7 +103,7 @@ void main() {
|
||||
expect(find.byKey(const Key('empty-state-action')), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('should_use_theme_aware_icon_colors', (tester) async {
|
||||
testWidgets('should_tint_the_bare_icon_for_light_and_dark', (tester) async {
|
||||
await _pump(
|
||||
tester,
|
||||
theme: AppTheme.dark(),
|
||||
@@ -133,7 +111,7 @@ void main() {
|
||||
);
|
||||
expect(
|
||||
tester.widget<Icon>(find.byKey(const Key('empty-state-icon'))).color,
|
||||
AppColors.blueSoft,
|
||||
AppColors.gold,
|
||||
);
|
||||
|
||||
await _pump(
|
||||
|
||||
Reference in new issue
Block a user