Skip to content

Commit e45672a

Browse files
[go_router_builder] Update case sensitive test to go_router 16.0.0 (#9482)
Part of - flutter/flutter#169809 Follow-up of - #9426 - #9444 Unskips and migrates the test about case sensitivity to the new version of `go_router` 15.2.4. ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent a6f0987 commit e45672a

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

packages/go_router_builder/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
collection: ^1.15.0
1010
flutter:
1111
sdk: flutter
12-
go_router: ^15.1.1
12+
go_router: ^16.0.0
1313
provider: 6.0.5
1414

1515
dev_dependencies:

packages/go_router_builder/example/test/case_sensitivity_example_test.dart

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'package:flutter/foundation.dart';
65
import 'package:flutter/material.dart';
76
import 'package:flutter_test/flutter_test.dart';
87
import 'package:go_router_builder_example/case_sensitive_example.dart';
@@ -27,28 +26,13 @@ void main() {
2726
});
2827

2928
testWidgets(
30-
// TODO(ValentinVignal): Migrate and unskip the test once
31-
// https://github.com/flutter/packages/pull/9426 is merged
32-
skip: true,
3329
'It should throw an error when the route is case sensitive and the path does not match',
3430
(WidgetTester tester) async {
35-
final FlutterExceptionHandler? oldFlutterError = FlutterError.onError;
36-
addTearDown(() => FlutterError.onError = oldFlutterError);
37-
final List<FlutterErrorDetails> errors = <FlutterErrorDetails>[];
38-
FlutterError.onError = (FlutterErrorDetails details) {
39-
errors.add(details);
40-
};
41-
4231
tester.platformDispatcher.defaultRouteNameTestValue = '/CASE-sensitive';
4332
await tester.pumpWidget(CaseSensitivityApp());
4433

4534
expect(find.widgetWithText(AppBar, 'Case Sensitive'), findsNothing);
46-
expect(errors, hasLength(1));
47-
expect(
48-
errors.single.exception,
49-
isAssertionError,
50-
reason: 'The path is case sensitive',
51-
);
35+
expect(find.text('Page Not Found'), findsOne);
5236
});
5337

5438
testWidgets(

0 commit comments

Comments
 (0)