Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
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);
|
|
});
|
|
}
|