feat(app): glass viewer bars, graph controls and immersive image viewer
Review findings F12, F13, F25 and F1 for viewers: the artifact viewer's actions/pager and the Changes pager float as glass pills over content, file facts move to the top bar, graph overlay controls are one glass pill (duplicate fullscreen glyph removed), the image viewer is immersive, and diff/artifact/graph views let content pass behind the bar. Implemented by pipeline run #204 (Terra); its Review stopped after three rejections, the last being an empty glass bar for a single unresolved artifact, which the manager fixed here with a regression test.
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
|
||||
import 'package:pipelines_app/features/changes/changes.dart';
|
||||
import 'package:pipelines_app/features/changes/widgets/visit_pager.dart';
|
||||
|
||||
@@ -139,6 +140,13 @@ void main() {
|
||||
// The second visit is its own page, not a second section.
|
||||
expect(find.text('reviewer'), findsNothing);
|
||||
expect(find.text(missingCaptureDetail), findsNothing);
|
||||
expect(
|
||||
find.ancestor(
|
||||
of: find.byKey(ChangesVisitPager.nextKey),
|
||||
matching: find.byType(GlassPill),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.byKey(ChangesVisitPager.nextKey));
|
||||
await tester.pump();
|
||||
@@ -269,7 +277,7 @@ void main() {
|
||||
expect(calls.single.arguments, {'text': multiHunkPatch});
|
||||
expect(find.text('Copied'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byTooltip('Close diff'));
|
||||
await tester.pageBack();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(Dialog), findsNothing);
|
||||
},
|
||||
@@ -385,7 +393,7 @@ void main() {
|
||||
expect(find.text('Rendered'), findsOneWidget);
|
||||
expect(find.text('Raw patch'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byIcon(CupertinoIcons.xmark));
|
||||
await tester.pageBack();
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
find.byType(CupertinoSlidingSegmentedControl<DiffForm>),
|
||||
@@ -444,7 +452,7 @@ void main() {
|
||||
// selection is offered through the native menu instead.
|
||||
expect(find.byTooltip('Diff form'), findsOneWidget);
|
||||
expect(find.text('Copy patch'), findsOneWidget);
|
||||
expect(find.byTooltip('Close diff'), findsOneWidget);
|
||||
expect(find.byTooltip('Close diff'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('without the settled-run gate there is no run-wide summary', (
|
||||
@@ -463,4 +471,40 @@ void main() {
|
||||
expect(find.text('Changes · not recorded for this run'), findsNothing);
|
||||
expect(find.text('Capture unavailable'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('does not show an empty floating bar without multiple visits', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
materialHost(
|
||||
ChangesViewer(
|
||||
finalOnly: true,
|
||||
steps: [
|
||||
stepFixture(
|
||||
fileChanges: captureFixture(
|
||||
files: [fileChangeFixture(path: 'lib/feature.dart')],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.byType(GlassPill), findsNothing);
|
||||
expect(find.byType(ChangesVisitPager), findsNothing);
|
||||
|
||||
await tester.pumpWidget(
|
||||
materialHost(
|
||||
ChangesViewer(steps: [stepFixture(fileChanges: captureFixture())]),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.byType(GlassPill), findsNothing);
|
||||
expect(find.byType(ChangesVisitPager), findsNothing);
|
||||
|
||||
await tester.pumpWidget(materialHost(const ChangesViewer(steps: [])));
|
||||
|
||||
expect(find.byType(GlassPill), findsNothing);
|
||||
expect(find.byType(ChangesVisitPager), findsNothing);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user