|
| 1 | +import 'package:alchemist/alchemist.dart'; |
| 2 | +import 'package:flutter/material.dart'; |
| 3 | +import 'package:flutter_test/flutter_test.dart'; |
| 4 | + |
| 5 | +void main() { |
| 6 | + group('Multiple icons test >', () { |
| 7 | + final iconsMap = <String, IconData>{ |
| 8 | + 'add': Icons.add, |
| 9 | + 'alarm': Icons.alarm, |
| 10 | + 'android': Icons.android, |
| 11 | + 'arrow_back': Icons.arrow_back, |
| 12 | + 'arrow_forward': Icons.arrow_forward, |
| 13 | + 'build': Icons.build, |
| 14 | + 'call': Icons.call, |
| 15 | + 'camera_alt': Icons.camera_alt, |
| 16 | + 'check': Icons.check, |
| 17 | + 'close': Icons.close, |
| 18 | + 'delete': Icons.delete, |
| 19 | + 'done': Icons.done, |
| 20 | + 'edit': Icons.edit, |
| 21 | + 'favorite': Icons.favorite, |
| 22 | + 'home': Icons.home, |
| 23 | + 'info': Icons.info, |
| 24 | + 'menu': Icons.menu, |
| 25 | + 'more_vert': Icons.more_vert, |
| 26 | + 'notifications': Icons.notifications, |
| 27 | + 'phone': Icons.phone, |
| 28 | + 'search': Icons.search, |
| 29 | + 'settings': Icons.settings, |
| 30 | + 'share': Icons.share, |
| 31 | + 'shopping_cart': Icons.shopping_cart, |
| 32 | + 'star': Icons.star, |
| 33 | + 'accessibility': Icons.accessibility, |
| 34 | + 'accessible': Icons.accessible, |
| 35 | + 'account_circle': Icons.account_circle, |
| 36 | + 'account_box': Icons.account_box, |
| 37 | + 'add_box': Icons.add_box, |
| 38 | + 'add_circle': Icons.add_circle, |
| 39 | + 'add_shopping_cart': Icons.add_shopping_cart, |
| 40 | + 'airplanemode_active': Icons.airplanemode_active, |
| 41 | + 'album': Icons.album, |
| 42 | + 'all_inbox': Icons.all_inbox, |
| 43 | + 'analytics': Icons.analytics, |
| 44 | + 'archive': Icons.archive, |
| 45 | + 'arrow_drop_down': Icons.arrow_drop_down, |
| 46 | + 'arrow_drop_up': Icons.arrow_drop_up, |
| 47 | + 'assessment': Icons.assessment, |
| 48 | + 'attach_file': Icons.attach_file, |
| 49 | + 'attachment': Icons.attachment, |
| 50 | + 'auto_fix_high': Icons.auto_fix_high, |
| 51 | + 'backup': Icons.backup, |
| 52 | + 'battery_full': Icons.battery_full, |
| 53 | + 'bed': Icons.bed, |
| 54 | + 'book': Icons.book, |
| 55 | + 'bookmark': Icons.bookmark, |
| 56 | + 'brightness_4': Icons.brightness_4, |
| 57 | + 'business': Icons.business, |
| 58 | + 'calendar_today': Icons.calendar_today, |
| 59 | + 'camera': Icons.camera, |
| 60 | + 'card_giftcard': Icons.card_giftcard, |
| 61 | + 'card_membership': Icons.card_membership, |
| 62 | + 'chat': Icons.chat, |
| 63 | + 'check_box': Icons.check_box, |
| 64 | + 'chevron_left': Icons.chevron_left, |
| 65 | + 'chevron_right': Icons.chevron_right, |
| 66 | + 'cloud': Icons.cloud, |
| 67 | + 'cloud_queue': Icons.cloud_queue, |
| 68 | + 'code': Icons.code, |
| 69 | + 'commute': Icons.commute, |
| 70 | + 'compare_arrows': Icons.compare_arrows, |
| 71 | + 'credit_card': Icons.credit_card, |
| 72 | + 'crop_square': Icons.crop_square, |
| 73 | + 'dashboard': Icons.dashboard, |
| 74 | + 'directions': Icons.directions, |
| 75 | + 'directions_bike': Icons.directions_bike, |
| 76 | + 'directions_car': Icons.directions_car, |
| 77 | + 'directions_walk': Icons.directions_walk, |
| 78 | + 'download': Icons.download, |
| 79 | + 'event': Icons.event, |
| 80 | + 'exit_to_app': Icons.exit_to_app, |
| 81 | + 'face': Icons.face, |
| 82 | + 'fingerprint': Icons.fingerprint, |
| 83 | + }; |
| 84 | + |
| 85 | + for (final iconEntry in iconsMap.entries) { |
| 86 | + goldenTest( |
| 87 | + 'should render icon ${iconEntry.key} correctly', |
| 88 | + fileName: 'icons/${iconEntry.key}', |
| 89 | + skip: true, // removes if you want to check loading fonts performance |
| 90 | + builder: () => GoldenTestScenario.builder( |
| 91 | + name: iconEntry.key, |
| 92 | + builder: (_) => Icon( |
| 93 | + iconEntry.value, |
| 94 | + size: 64, |
| 95 | + ), |
| 96 | + ), |
| 97 | + ); |
| 98 | + } |
| 99 | + }); |
| 100 | +} |
0 commit comments