Files
cutdex/test/source_preview_test.dart
lingjhf 38ca180cf7
Gitea CI / Check code and tests (pull_request) Failing after 8s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 1s
refactor(core): own editor UI and pin verified native releases
2026-10-12 03:20:29 +08:00

23 lines
674 B
Dart

import 'package:cutdex/workspace/preview_target.dart';
import 'package:cutdex_core/project.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
final asset = AssetDocument(
id: 'source',
name: 'portrait.mov',
storage: AssetStorage.external,
location: 'file:///source.mov',
);
test('returning to timeline keeps the source position without editing timeline state', () {
final target = PreviewTarget();
target.showAsset(asset);
target.positions[asset.id] = 42;
target.showTimeline();
expect(target.asset, isNull);
target.showAsset(asset);
expect(target.positions[asset.id], 42);
target.dispose();
});
}