Files
BlockSeasons/test/ui/season_background_test.dart
T

26 lines
837 B
Dart

import 'package:block_seasons/game/models/season.dart';
import 'package:block_seasons/ui/widgets/season_background.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('renders and settles with looping animations disabled',
(tester) async {
await tester.pumpWidget(const MaterialApp(
home: SeasonBackground(theme: SeasonTheme.fallback),
));
await tester.pumpAndSettle();
expect(find.byType(SeasonBackground), findsOneWidget);
});
testWidgets('particleType none still renders', (tester) async {
await tester.pumpWidget(const MaterialApp(
home: SeasonBackground(
theme: SeasonTheme(particleType: 'none'),
),
));
await tester.pumpAndSettle();
expect(find.byType(CustomPaint), findsWidgets);
});
}