Remove Cupertino schedules branches

Keep the Material-only schedules implementation while preserving public Cupertino parameters for callers. Remove Cupertino-only test hosts and variants because the app runs every schedule screen under MaterialApp.
This commit is contained in:
2026-11-11 04:26:05 +00:00
parent a135430526
commit 4647b9c43e
26 changed files with 144 additions and 589 deletions
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/api_gateway.dart';
@@ -68,23 +67,15 @@ JsonMap restrictedRunFixture() => {
'output_format': 'json',
};
Future<void> pumpAction(
WidgetTester tester,
Widget child, {
bool cupertino = false,
}) async {
Future<void> pumpAction(WidgetTester tester, Widget child) async {
tester.view.physicalSize = const Size(390, 1600);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(
cupertino
? CupertinoApp(
home: CupertinoPageScaffold(child: SafeArea(child: child)),
)
: MaterialApp(
home: Scaffold(body: SafeArea(child: child)),
),
MaterialApp(
home: Scaffold(body: SafeArea(child: child)),
),
);
await tester.pumpAndSettle();
}
@@ -225,38 +216,4 @@ void main() {
await openMenu(runFixture(pipelineId: null));
expect(find.text(scheduleRunActionLabel), findsNothing);
});
testWidgets('Cupertino uses the native action and fields', (tester) async {
final gateway = SaveGateway();
await pumpAction(
tester,
ScheduleRunAction(run: runFixture(), gateway: gateway),
cupertino: true,
);
final action = find.byKey(scheduleRunActionKey);
expect(
find.widgetWithText(CupertinoButton, scheduleRunActionLabel),
findsOne,
);
await tester.tap(action);
await tester.pumpAndSettle();
expect(gateway.calls, isEmpty);
expect(find.byKey(scheduleEditorSubmitKey), findsOneWidget);
expect(
tester
.widget<CupertinoTextField>(find.byKey(scheduleEditorVersionKey))
.controller
?.text,
'5',
);
expect(
tester
.widget<CupertinoTextField>(find.byKey(scheduleEditorWorkspaceKey))
.controller
?.text,
'/srv/run-workspace',
);
});
}