feat(app): graph pan, zoom and expanded view

This commit is contained in:
2026-10-22 02:05:20 +01:00
parent d5f24b8259
commit cc7eba59b6
19 changed files with 2622 additions and 200 deletions
@@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/graph/domain/graph_protocol.dart';
import 'package:pipelines_app/features/graph/viewport/graph_expanded_view.dart';
import 'package:pipelines_app/features/graph/widgets/graph_stage_node.dart';
import 'package:pipelines_app/features/graph/widgets/run_graph_canvas.dart';
import 'package:pipelines_app/features/graph/widgets/run_graph_view.dart';
@@ -203,6 +204,24 @@ void main() {
expect(tester.takeException(), isNull);
});
testWidgets('the expanded run graph keeps the route legend', (tester) async {
await tester.pumpWidget(_materialHost(linearGraph(), _runningRun()));
await _settle(tester);
await tester.tap(find.byKey(const Key('graph-expand')));
await tester.pumpAndSettle();
final expanded = find.byType(GraphExpandedView);
expect(expanded, findsOneWidget);
for (final label in [runGraphExecuted, runGraphNotExecuted]) {
expect(
find.descendant(of: expanded, matching: find.text(label)),
findsOneWidget,
reason: 'the full-screen canvas must explain its routes: $label',
);
}
expect(tester.takeException(), isNull);
});
testWidgets('only routes the run took are executed and labelled', (
tester,
) async {
@@ -439,7 +458,13 @@ void main() {
await _settle(tester);
expect(find.byType(Card), findsNothing);
expect(find.byType(CupertinoButton), findsNWidgets(5));
expect(
find.descendant(
of: find.byType(GraphStageNode),
matching: find.byType(CupertinoButton),
),
findsNWidgets(5),
);
expect(find.text(runGraphExecuted), findsOneWidget);
expect(find.text(runGraphNotExecuted), findsOneWidget);
expect(