Merge branch 'run/artifacts-collapsed' into integrate/bars-artifacts

This commit is contained in:
2026-10-31 00:29:54 +00:00
8 changed files with 79 additions and 2 deletions
@@ -5,6 +5,7 @@ import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/runs/data/runs_repository.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
import 'package:pipelines_app/features/runs/ui/runs_controller.dart';
import 'package:pipelines_app/ui/layout/sticky_section.dart';
import '../../artifacts/domain/artifact_fixtures.dart';
@@ -113,6 +114,11 @@ void main() {
await tester.pumpAndSettle();
await tester.tap(find.byKey(const ValueKey('run-detail-tab-artifacts')));
await tester.pumpAndSettle();
final sections = find.byType(StickySectionTitle);
for (var index = 0; index < sections.evaluate().length; index += 1) {
await tester.tap(sections.at(index));
}
await tester.pumpAndSettle();
expect(find.text('Artifacts · 2 recorded'), findsOneWidget);
expect(find.text('build.log'), findsOneWidget);
@@ -6,10 +6,19 @@ import 'package:pipelines_app/features/graph/widgets/stage_definition_view.dart'
import 'package:pipelines_app/features/runs/ui/run_detail_visit_facts.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_visit_sections.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_visit_session_state.dart';
import 'package:pipelines_app/ui/layout/sticky_section.dart';
import 'run_detail_graph_support.dart';
import 'run_detail_visit_support.dart';
Future<void> _expandArtifactGroup(WidgetTester tester) async {
final sections = find.byType(StickySectionTitle);
for (var index = 0; index < sections.evaluate().length; index += 1) {
await tester.tap(sections.at(index));
}
await tester.pumpAndSettle();
}
void main() {
for (final platform in RunDetailTestPlatform.values) {
testWidgets('${platform.name} stage tabs sit at the bottom with one Back', (
@@ -71,6 +80,7 @@ void main() {
await openVisitTab(tester, RunVisitSection.artifacts);
// The section is the run's gallery, focused on this visit: exactly the
// stage's files, without the session evidence file.
await _expandArtifactGroup(tester);
expect(find.byType(ArtifactGalleryPage), findsOneWidget);
expect(find.text('plan.csv'), findsOneWidget);
expect(find.text('session.html'), findsNothing);
@@ -185,6 +195,7 @@ void main() {
await openVisit(tester, platform, run: run, sequence: 2);
expectVisitHeading(tester, 'plan', 2);
await openVisitTab(tester, RunVisitSection.artifacts);
await _expandArtifactGroup(tester);
expect(find.text('plan-2.csv'), findsOneWidget);
expect(find.text('public/shared.csv'), findsNothing);
expect(find.byType(ArtifactGalleryPage), findsOneWidget);