feat(app): open pipeline and template deep links and route search results

This commit is contained in:
2026-10-22 09:58:09 +01:00
parent edfcfb0bc9
commit 7aa7007aee
8 changed files with 119 additions and 7 deletions
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/pipelines/screen.dart';
import 'fixtures.dart';
import 'test_helpers.dart';
/// A deep link opens the pipeline and version it names, not the list.
void main() {
testWidgets('an initial pipeline route opens that pinned detail', (
tester,
) async {
final fixture = PipelineFixture();
final gateway = gatewayFor(fixture);
tester.view.physicalSize = const Size(1100, 900);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(
MaterialApp(
home: PipelinesScreen(
gateway: gateway,
initialPipelineId: 1,
initialVersion: 2,
),
),
);
await tester.pumpAndSettle();
// The detail is open (not the "Select a pipeline." placeholder), and the
// detail request names the route's pinned version.
expect(find.text('Select a pipeline.'), findsNothing);
expect(find.text('Alpha review'), findsWidgets);
expect(
gateway.callsOf('get_pipeline').where(
(call) =>
'${call.fields['pipeline_id']}' == '1' &&
'${call.fields['version']}' == '2',
),
isNotEmpty,
);
});
}