feat(ui): 更新品牌启动页与选集交互
This commit is contained in:
1 parent
4778ce2c75
commit
c1cb7d1c11
87 files changed
+919
-552
No files matched your search
@@ -14,11 +14,16 @@ double _contrast(Color foreground, Color background) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
test('should_expose_approved_klein_blue_tokens', () {
|
||||
expect(AppColors.blue, const Color(0xFF002FA7));
|
||||
expect(AppColors.bluePressed, const Color(0xFF00227A));
|
||||
expect(AppColors.blueSoft, const Color(0xFF5B7BE0));
|
||||
test('should_expose_indonesia_evening_brand_tokens', () {
|
||||
expect(AppColors.blue, const Color(0xFFC4322A));
|
||||
expect(AppColors.bluePressed, const Color(0xFF8E221C));
|
||||
expect(AppColors.blueSoft, const Color(0xFFFF8A72));
|
||||
expect(AppColors.gold, const Color(0xFFF6C453));
|
||||
expect(AppColors.onPrimary, const Color(0xFFFFFFFF));
|
||||
expect(
|
||||
_contrast(AppColors.onGold, AppColors.gold),
|
||||
greaterThanOrEqualTo(4.5),
|
||||
);
|
||||
});
|
||||
|
||||
test('should_meet_text_and_icon_contrast_when_using_theme_tokens', () {
|
||||
@@ -33,7 +38,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('should_use_klein_blue_in_light_and_dark_color_schemes', () {
|
||||
test('should_use_chili_brand_in_light_and_dark_color_schemes', () {
|
||||
for (final theme in [AppTheme.light(), AppTheme.dark()]) {
|
||||
expect(theme.colorScheme.primary, AppColors.blue);
|
||||
expect(theme.colorScheme.onPrimary, AppColors.onPrimary);
|
||||
@@ -52,7 +57,7 @@ void main() {
|
||||
expect(light.outlineVariant.computeLuminance(), lessThan(0.92));
|
||||
});
|
||||
|
||||
testWidgets('should_expose_klein_blue_through_widget_theme', (tester) async {
|
||||
testWidgets('should_expose_chili_brand_through_widget_theme', (tester) async {
|
||||
late ThemeData applied;
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
||||
Reference in new issue
Block a user