test(ui): 更新三 Tab 预览断言

This commit is contained in:
Zhou Weidong committed 2026-10-19 15:50:24 +08:00
1 parent fecc5b0d27
commit 8767b5644b
1 file changed
+8 -7
+8 -7
View File
@@ -52,15 +52,14 @@ void main() {
final decoration = bar.decoration as BoxDecoration; final decoration = bar.decoration as BoxDecoration;
final border = decoration.border as Border; final border = decoration.border as Border;
expect(decoration.color, AppColors.bar.withValues(alpha: 0.95)); expect(decoration.color, AppColors.bar.withValues(alpha: 0.95));
expect(border.top.color, AppColors.border); expect(border.top.color, AppColors.outlineVariantDark);
expect(border.top.color.a, lessThan(0.2));
expect(border.top.color, isNot(Colors.white)); expect(border.top.color, isNot(Colors.white));
expect( expect(
tester tester
.widget<AnimatedContainer>( .widget<AnimatedScale>(
find.descendant( find.descendant(
of: find.byKey(const Key('tab-home')), of: find.byKey(const Key('tab-home')),
matching: find.byType(AnimatedContainer), matching: find.byType(AnimatedScale),
), ),
) )
.duration, .duration,
@@ -69,7 +68,7 @@ void main() {
expect( expect(
find.descendant( find.descendant(
of: find.byKey(const Key('tab-home')), of: find.byKey(const Key('tab-home')),
matching: find.byIcon(Icons.home_rounded), matching: find.byIcon(Icons.play_circle_fill_rounded),
), ),
findsOneWidget, findsOneWidget,
); );
@@ -90,7 +89,7 @@ void main() {
expect( expect(
find.descendant( find.descendant(
of: find.byKey(const Key('tab-home')), of: find.byKey(const Key('tab-home')),
matching: find.byIcon(Icons.home_outlined), matching: find.byIcon(Icons.play_circle_outline_rounded),
), ),
findsOneWidget, findsOneWidget,
); );
@@ -100,7 +99,9 @@ void main() {
tester, tester,
) async { ) async {
await _pumpApp(tester); await _pumpApp(tester);
await tester.tap(find.byTooltip('Clear screen')); await tester.tap(find.byKey(const Key('home-feed-more')));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('home-feed-clear')));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
for (final key in _keys) { for (final key in _keys) {