test(ui): 更新三 Tab 预览断言
This commit is contained in:
1 parent
fecc5b0d27
commit
8767b5644b
1 file changed
+8
-7
@@ -52,15 +52,14 @@ void main() {
|
||||
final decoration = bar.decoration as BoxDecoration;
|
||||
final border = decoration.border as Border;
|
||||
expect(decoration.color, AppColors.bar.withValues(alpha: 0.95));
|
||||
expect(border.top.color, AppColors.border);
|
||||
expect(border.top.color.a, lessThan(0.2));
|
||||
expect(border.top.color, AppColors.outlineVariantDark);
|
||||
expect(border.top.color, isNot(Colors.white));
|
||||
expect(
|
||||
tester
|
||||
.widget<AnimatedContainer>(
|
||||
.widget<AnimatedScale>(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('tab-home')),
|
||||
matching: find.byType(AnimatedContainer),
|
||||
matching: find.byType(AnimatedScale),
|
||||
),
|
||||
)
|
||||
.duration,
|
||||
@@ -69,7 +68,7 @@ void main() {
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('tab-home')),
|
||||
matching: find.byIcon(Icons.home_rounded),
|
||||
matching: find.byIcon(Icons.play_circle_fill_rounded),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
@@ -90,7 +89,7 @@ void main() {
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('tab-home')),
|
||||
matching: find.byIcon(Icons.home_outlined),
|
||||
matching: find.byIcon(Icons.play_circle_outline_rounded),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
@@ -100,7 +99,9 @@ void main() {
|
||||
tester,
|
||||
) async {
|
||||
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();
|
||||
|
||||
for (final key in _keys) {
|
||||
|
||||
Reference in new issue
Block a user