import 'package:block_seasons/ui/screens/splash_screen.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('splash wordmark is horizontally centered', (tester) async { await tester.pumpWidget(MaterialApp( home: SplashScreen(nextScreen: () => const Scaffold(body: SizedBox())), )); // Mid-animation: wordmark already laid out. await tester.pump(const Duration(milliseconds: 1500)); final screenWidth = tester.getSize(find.byType(SplashScreen)).width; final wordmark = tester.getCenter(find.text('BLOCK SEASONS')); expect(wordmark.dx, closeTo(screenWidth / 2, 1.0)); // Drain the rest of the animation so no timers leak. await tester.pump(const Duration(milliseconds: 600)); await tester.pumpAndSettle(); }); }