feat(ui): 更新底栏图标与播放加载视觉
This commit is contained in:
1 parent
8ec6df2be5
commit
12b1a11bd3
11 files changed
+584
-70
No files matched your search
@@ -0,0 +1,38 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:fruitshorts/core/widgets/app_root_tab.dart';
|
||||
import 'package:fruitshorts/core/widgets/root_nav_glyph.dart';
|
||||
import 'package:fruitshorts/l10n/app_localizations.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'should_render_four_ordered_glyphs_with_home_selected_when_root_nav_builds',
|
||||
(tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: Scaffold(
|
||||
bottomNavigationBar: AppRootBottomNav(
|
||||
selected: AppRootTab.home,
|
||||
onSelected: (_) {},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final glyphs = tester
|
||||
.widgetList<RootNavGlyph>(find.byType(RootNavGlyph))
|
||||
.toList();
|
||||
expect(glyphs.map((glyph) => glyph.kind), RootNavGlyphKind.values);
|
||||
expect(glyphs.map((glyph) => glyph.selected), [
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
]);
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user