Remove remaining Cupertino-only shell tests
Keep the Material coverage while removing tests for unreachable Cupertino hosts and variants from the shell cleanup.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import '../../../native_back.dart';
|
import '../../../native_back.dart';
|
||||||
@@ -9,7 +8,6 @@ import 'package:pipelines_app/features/runs/screen.dart';
|
|||||||
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
||||||
import 'run_detail_finders.dart';
|
import 'run_detail_finders.dart';
|
||||||
import 'package:pipelines_app/shell/empty_detail_pane.dart';
|
import 'package:pipelines_app/shell/empty_detail_pane.dart';
|
||||||
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
|
|
||||||
|
|
||||||
class _Gateway implements ApiGateway {
|
class _Gateway implements ApiGateway {
|
||||||
final framesController = StreamController<JsonMap>.broadcast();
|
final framesController = StreamController<JsonMap>.broadcast();
|
||||||
@@ -345,32 +343,6 @@ void main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
testWidgets(
|
|
||||||
'wide Cupertino host keeps list and detail bars while pending',
|
|
||||||
(tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
CupertinoApp(
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(middle: Text('Runs')),
|
|
||||||
child: SafeArea(
|
|
||||||
child: RunsScreen(gateway: gateway, initialRunId: 1),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
await _mountList(tester, gateway);
|
|
||||||
|
|
||||||
expect(find.byType(CupertinoPageScaffold), findsNWidgets(2));
|
|
||||||
// The host's own bar and the detail pane's segmented bar.
|
|
||||||
expect(find.byType(CupertinoNavigationBar), findsOneWidget);
|
|
||||||
expect(find.byType(SegmentedBar), findsOneWidget);
|
|
||||||
expect(find.text('Loading run details…'), findsOneWidget);
|
|
||||||
expect(find.byType(CupertinoActivityIndicator), findsOneWidget);
|
|
||||||
expect(find.text('Back to list'), findsOneWidget);
|
|
||||||
},
|
|
||||||
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
|
|
||||||
);
|
|
||||||
|
|
||||||
testWidgets('on a phone an open run is its own page and Back returns', (
|
testWidgets('on a phone an open run is its own page and Back returns', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
|
|||||||
@@ -27,12 +27,4 @@ void main() {
|
|||||||
debugDefaultTargetPlatformOverride = null;
|
debugDefaultTargetPlatformOverride = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
testWidgets('an explicit cupertino choice still builds the Cupertino host', (
|
|
||||||
tester,
|
|
||||||
) async {
|
|
||||||
await tester.pumpWidget(const MyApp(cupertino: true));
|
|
||||||
expect(find.byType(CupertinoApp), findsOneWidget);
|
|
||||||
await tester.pumpWidget(const SizedBox.shrink());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user