import 'package:cutdex/app/editor_theme.dart'; import 'package:cutdex/features/timeline/timeline_panel.dart'; import 'package:cutdex/l10n/app_localizations.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('timeline empty state matches the wide drop-zone layout', ( tester, ) async { await tester.pumpWidget( MaterialApp( localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, locale: const Locale('zh'), theme: EditorTheme.penDark, home: const Scaffold( body: SizedBox( width: 800, height: 300, child: TimelineEmptyDropZone( primaryTop: 48, primaryHeight: 72, verticalOffset: 20, ), ), ), ), ); final zone = find.byKey(const ValueKey('timeline-empty-drop-zone')); expect(find.text('将媒体拖到此处以开始。'), findsOneWidget); expect(tester.getSize(zone), const Size(768, 72)); expect(tester.getTopLeft(zone), const Offset(16, 28)); expect(tester.takeException(), isNull); }); }