| 1234567891011121314151617181920212223242526272829303132 |
- import 'package:cardash_launcher/core/theme/app_theme.dart';
- import 'package:cardash_launcher/features/home/widgets/shortcut_tile.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_test/flutter_test.dart';
- void main() {
- testWidgets('an unassigned shortcut invites the user to pick an app', (
- tester,
- ) async {
- await tester.pumpWidget(
- MaterialApp(
- theme: AppTheme.light(),
- home: Scaffold(
- body: Center(
- child: ShortcutTile(
- title: 'Navigation',
- subtitle: 'Select app',
- iconAsset: 'assets/icons/navigation.svg',
- size: 150,
- assigned: false,
- onTap: () {},
- ),
- ),
- ),
- ),
- );
- await tester.pump();
- expect(find.text('Navigation'), findsOneWidget);
- expect(find.text('Select app'), findsOneWidget);
- });
- }
|