Remove Cupertino update dialog branches
Keep the Material update dialogs as the only reachable implementation while preserving public cupertino parameters for callers. Update focused tests and document the verified checks.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/application/pipelines_app.dart';
|
||||
import 'package:pipelines_app/application/server_endpoint.dart';
|
||||
@@ -14,7 +14,6 @@ void main() {
|
||||
Future<void> mount(
|
||||
WidgetTester tester, {
|
||||
bool web = true,
|
||||
bool cupertino = false,
|
||||
Future<String?> Function(Uri)? read,
|
||||
Future<void> Function()? refresh,
|
||||
UpdateInstaller? installer,
|
||||
@@ -31,7 +30,7 @@ void main() {
|
||||
web: true,
|
||||
),
|
||||
client: PipelinesClient(channelFactory: (_) => channel),
|
||||
cupertino: cupertino,
|
||||
cupertino: false,
|
||||
routeInformationProvider: provider,
|
||||
webPlatform: web,
|
||||
webPageUri: Uri.parse('https://app.test/chats?selected=1'),
|
||||
@@ -180,7 +179,6 @@ void main() {
|
||||
var refreshes = 0;
|
||||
await mount(
|
||||
tester,
|
||||
cupertino: true,
|
||||
read: (uri) async {
|
||||
expect(uri, Uri.parse('https://app.test/release.json'));
|
||||
return '{"schema":1,"platform":"web","buildId":"web-new"}';
|
||||
@@ -189,7 +187,7 @@ void main() {
|
||||
refreshes++;
|
||||
},
|
||||
);
|
||||
expect(find.byType(CupertinoAlertDialog), findsOneWidget);
|
||||
expect(find.byType(AlertDialog), findsOneWidget);
|
||||
expect(refreshes, 0);
|
||||
await tester.tap(find.text('Refresh'));
|
||||
await tester.pump();
|
||||
|
||||
Reference in New Issue
Block a user