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
@@ -0,0 +1,65 @@
|
||||
import 'package:cutdex/features/timeline/timeline_ruler_previews.dart';
|
||||
import 'package:cutdex_sdk/timeline_ui.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
for (final (layout, light, dark, frames) in [
|
||||
(
|
||||
TimelineRulerTimecodeLayout.inline,
|
||||
timecodeRulerLightPreview,
|
||||
timecodeRulerDarkPreview,
|
||||
timecodeRulerFramePreview,
|
||||
),
|
||||
(
|
||||
TimelineRulerTimecodeLayout.centered,
|
||||
centeredTimecodeRulerLightPreview,
|
||||
centeredTimecodeRulerDarkPreview,
|
||||
centeredTimecodeRulerFramePreview,
|
||||
),
|
||||
(
|
||||
TimelineRulerTimecodeLayout.overlay,
|
||||
overlayTimecodeRulerLightPreview,
|
||||
overlayTimecodeRulerDarkPreview,
|
||||
overlayTimecodeRulerFramePreview,
|
||||
),
|
||||
]) {
|
||||
testWidgets('${layout.name} previews render and zoom at both widths', (
|
||||
tester,
|
||||
) async {
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.macOS;
|
||||
try {
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
for (final (width, factory) in [
|
||||
(640.0, light),
|
||||
(640.0, dark),
|
||||
(640.0, frames),
|
||||
(320.0, dark),
|
||||
]) {
|
||||
// Remount to give each configuration its own camera state.
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
tester.view.physicalSize = Size(width, 152);
|
||||
await tester.pumpWidget(factory());
|
||||
await tester.pump();
|
||||
final ruler = tester.widget<TimelineRuler>(
|
||||
find.byType(TimelineRuler),
|
||||
);
|
||||
expect(ruler.style, TimelineRulerStyle.timecode);
|
||||
expect(ruler.timecodeLayout, layout);
|
||||
expect(tester.takeException(), isNull);
|
||||
final before = ruler.controller.camera.pixelsPerTick;
|
||||
await tester.tap(find.byTooltip('Zoom in'));
|
||||
await tester.pump();
|
||||
expect(ruler.controller.camera.pixelsPerTick, greaterThan(before));
|
||||
expect(tester.takeException(), isNull);
|
||||
}
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
} finally {
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user