feat(workspace): 桌面工作区、主题与交互更新,发布 0.1.2
Gitea CI / Check code and tests (push) Successful in 6m37s
Gitea CI / Build Windows x64 app (push) Successful in 3m18s
Gitea CI / Build Android APK (push) Successful in 3m47s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m7s
Gitea CI / Assemble and validate CI artifacts (push) Successful in 50s
Gitea CI / Gitea CI passed (push) Successful in 2s
Gitea Release / Prepare draft Release (push) Successful in 9s
Gitea Release / Upload Android to draft Release (push) Successful in 16s
Gitea Release / Upload Windows to draft Release (push) Successful in 22s
Gitea Release / Verify and publish Release (push) Successful in 14s
Gitea CI / Check code and tests (push) Successful in 6m37s
Gitea CI / Build Windows x64 app (push) Successful in 3m18s
Gitea CI / Build Android APK (push) Successful in 3m47s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m7s
Gitea CI / Assemble and validate CI artifacts (push) Successful in 50s
Gitea CI / Gitea CI passed (push) Successful in 2s
Gitea Release / Prepare draft Release (push) Successful in 9s
Gitea Release / Upload Android to draft Release (push) Successful in 16s
Gitea Release / Upload Windows to draft Release (push) Successful in 22s
Gitea Release / Verify and publish Release (push) Successful in 14s
This commit was merged in pull request #13.
This commit is contained in:
1 parent
aa5255d1e4
commit
abc1868550
260 files changed
+43964
-5591
No files matched your search
@@ -12,6 +12,62 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'support/preview_fixture.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('inactive picture properties ignore replacement notifications', (
|
||||
tester,
|
||||
) async {
|
||||
final fixture = (await tester.runAsync(
|
||||
() =>
|
||||
createPreviewFixture(Uri.file('/test/image.png'), mediaType: 'image'),
|
||||
))!;
|
||||
addTearDown(
|
||||
() => tester.runAsync(() async {
|
||||
await fixture.workspace.close();
|
||||
await fixture.directory.delete(recursive: true);
|
||||
}),
|
||||
);
|
||||
final view = fixture.timeline.view(SequenceId('one'));
|
||||
final clip = view.version.kernelVersion.query().element(
|
||||
view.version.kernelVersion.query().elementById(ElementId('clip'))!,
|
||||
);
|
||||
final project = fixture.workspace.project!.info.id;
|
||||
final container = ProviderContainer(
|
||||
overrides: [
|
||||
editorPreviewProvider(project, 'project').overrideWith((ref) => null),
|
||||
],
|
||||
);
|
||||
addTearDown(container.dispose);
|
||||
Widget host(Widget child) => UncontrolledProviderScope(
|
||||
container: container,
|
||||
child: MaterialApp(
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
locale: const Locale('zh'),
|
||||
theme: EditorTheme.penLight,
|
||||
home: Scaffold(body: SingleChildScrollView(child: child)),
|
||||
),
|
||||
);
|
||||
await tester.pumpWidget(
|
||||
host(
|
||||
PictureProperties(
|
||||
projectId: project,
|
||||
timelineId: 'project',
|
||||
session: fixture.timeline,
|
||||
sequence: SequenceId('one'),
|
||||
clip: clip,
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const ValueKey('picture-x')), findsOneWidget);
|
||||
await tester.pumpWidget(
|
||||
host(_NotifyOnMount(() => view.seekTo(TimelineClock.ticksPerSecond))),
|
||||
);
|
||||
expect(view.playheadTick, TimelineClock.ticksPerSecond);
|
||||
expect(find.byType(PictureProperties), findsNothing);
|
||||
expect(tester.takeException(), isNull);
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
});
|
||||
|
||||
testWidgets('cursor changes preserve inspector selection subscriptions', (
|
||||
tester,
|
||||
) async {
|
||||
@@ -35,6 +91,17 @@ void main() {
|
||||
view.setSelection([clip]);
|
||||
expect(inspector.selectedClips.single.id, ElementId('clip'));
|
||||
final selectedCount = notifications;
|
||||
f.timeline.commands.setTransform(
|
||||
sequence: SequenceId('one'),
|
||||
clip: ElementId('clip'),
|
||||
tick: 0,
|
||||
change: (value) => value.copyWith(x: .25),
|
||||
);
|
||||
expect(
|
||||
notifications,
|
||||
selectedCount,
|
||||
reason: 'Property values belong to editors, not selection shell',
|
||||
);
|
||||
view.beginScrubbing();
|
||||
for (var i = 1; i <= 120; i++) {
|
||||
view.seekTo(i * TimelineClock.ticksPerSecond ~/ 120);
|
||||
@@ -53,6 +120,7 @@ void main() {
|
||||
switchedCount,
|
||||
reason: 'Old sequence listener is detached',
|
||||
);
|
||||
await tester.runAsync(f.timeline.flush);
|
||||
});
|
||||
|
||||
testWidgets('static controls stay stable and discard edits after a seek', (
|
||||
@@ -144,3 +212,22 @@ void main() {
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
});
|
||||
}
|
||||
|
||||
class _NotifyOnMount extends StatefulWidget {
|
||||
const _NotifyOnMount(this.notify);
|
||||
final VoidCallback notify;
|
||||
|
||||
@override
|
||||
State<_NotifyOnMount> createState() => _NotifyOnMountState();
|
||||
}
|
||||
|
||||
class _NotifyOnMountState extends State<_NotifyOnMount> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.notify();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => const SizedBox();
|
||||
}
|
||||
Reference in new issue
Block a user