Remove Cupertino shell branches

Keep the Material-only shell path while preserving public cupertino parameters for callers. Narrow matching tests to Material hosts and behavior because the app always runs under MaterialApp.
This commit is contained in:
2026-11-11 03:48:41 +00:00
parent baac6eca9a
commit 9bdabb32d9
33 changed files with 1646 additions and 2326 deletions
@@ -26,9 +26,8 @@ import 'search_wiring_test.dart'
void main() {
Future<PlatformRouteInformationProvider> openPhoneApp(
WidgetTester tester,
FakeChannel channel, {
required bool cupertino,
}) async {
FakeChannel channel,
) async {
tester.view.physicalSize = const Size(390, 844);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
@@ -42,77 +41,65 @@ void main() {
channel: channel,
client: PipelinesClient(channelFactory: (_) => channel),
provider: provider,
cupertino: cupertino,
);
await replyRunList(tester, channel);
return provider;
}
for (final cupertino in [false, true]) {
final platform = cupertino ? 'Cupertino' : 'Material';
testWidgets('phone: an artifact hit opens that artifact in the '
'viewer, and Back shows it on the run Artifacts tab', (tester) async {
final channel = FakeChannel()..readyCompleter.complete();
final provider = await openPhoneApp(tester, channel);
testWidgets('$platform phone: an artifact hit opens that artifact in the '
'viewer, and Back shows it on the run Artifacts tab', (tester) async {
final channel = FakeChannel()..readyCompleter.complete();
final provider = await openPhoneApp(
tester,
channel,
cupertino: cupertino,
);
await openArtifactHit(tester, channel);
expect(provider.value.uri.path, '/runs/7');
await replyRunDetailFor(tester, channel, searchSelectionDetail());
await tester.pumpAndSettle();
await openArtifactHit(tester, channel);
expect(provider.value.uri.path, '/runs/7');
await replyRunDetailFor(tester, channel, searchSelectionDetail());
await tester.pumpAndSettle();
expect(find.byType(SearchScreen), findsNothing);
final viewer = tester.widget<ArtifactViewerPage>(
find.byType(ArtifactViewerPage),
);
expect(viewer.selectedIdentity, contains('report.txt'));
expect(find.text('report.txt'), findsWidgets);
expect(find.byType(SearchScreen), findsNothing);
final viewer = tester.widget<ArtifactViewerPage>(
find.byType(ArtifactViewerPage),
);
expect(viewer.selectedIdentity, contains('report.txt'));
expect(find.text('report.txt'), findsWidgets);
await closeViewer(tester);
expectArtifactsTabSelecting(tester, '/artifacts/7/2/report.txt');
await closeViewer(tester);
expectArtifactsTabSelecting(tester, '/artifacts/7/2/report.txt');
await tester.pumpWidget(const SizedBox.shrink());
await tester.pump();
});
await tester.pumpWidget(const SizedBox.shrink());
await tester.pump();
});
testWidgets('phone: an artifact the run no longer lists opens '
'its Artifacts tab with a notice', (tester) async {
final channel = FakeChannel()..readyCompleter.complete();
await openPhoneApp(tester, channel);
testWidgets('$platform phone: an artifact the run no longer lists opens '
'its Artifacts tab with a notice', (tester) async {
final channel = FakeChannel()..readyCompleter.complete();
await openPhoneApp(tester, channel, cupertino: cupertino);
await openArtifactHit(tester, channel);
final detail = searchSelectionDetail();
final steps = [
for (final step in detail['steps'] as List)
Map<String, dynamic>.from(step as Map),
];
steps[1]['artifacts'] = <JsonMap>[
{
'name': 'other.txt',
'content_type': 'text/plain',
'size_bytes': 3,
'url': '/artifacts/7/2/other.txt',
},
];
await replyRunDetailFor(tester, channel, {...detail, 'steps': steps});
await tester.pumpAndSettle();
await openArtifactHit(tester, channel);
final detail = searchSelectionDetail();
final steps = [
for (final step in detail['steps'] as List)
Map<String, dynamic>.from(step as Map),
];
steps[1]['artifacts'] = <JsonMap>[
{
'name': 'other.txt',
'content_type': 'text/plain',
'size_bytes': 3,
'url': '/artifacts/7/2/other.txt',
},
];
await replyRunDetailFor(tester, channel, {...detail, 'steps': steps});
await tester.pumpAndSettle();
expect(find.byType(ArtifactViewerPage), findsNothing);
expect(
find.byKey(const ValueKey('run-detail-artifacts-7')),
findsOneWidget,
);
expect(find.text('That artifact is no longer available.'), findsOneWidget);
expect(find.byType(ArtifactViewerPage), findsNothing);
expect(
find.byKey(const ValueKey('run-detail-artifacts-7')),
findsOneWidget,
);
expect(
find.text('That artifact is no longer available.'),
findsOneWidget,
);
await tester.pumpWidget(const SizedBox.shrink());
await tester.pump();
});
}
await tester.pumpWidget(const SizedBox.shrink());
await tester.pump();
});
}