File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
examples/api/test/widgets/navigator Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,6 @@ final Set<String> _knownMissingTests = <String>{
358
358
'examples/api/test/rendering/scroll_direction/scroll_direction.0_test.dart' ,
359
359
'examples/api/test/painting/star_border/star_border.0_test.dart' ,
360
360
'examples/api/test/widgets/navigator/navigator.restorable_push_and_remove_until.0_test.dart' ,
361
- 'examples/api/test/widgets/navigator/navigator.0_test.dart' ,
362
361
'examples/api/test/widgets/navigator/navigator.restorable_push.0_test.dart' ,
363
362
'examples/api/test/widgets/navigator/navigator_state.restorable_push_replacement.0_test.dart' ,
364
363
'examples/api/test/widgets/navigator/navigator_state.restorable_push_and_remove_until.0_test.dart' ,
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Flutter Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import 'package:flutter_api_samples/widgets/navigator/navigator.0.dart' as example;
6
+ import 'package:flutter_test/flutter_test.dart' ;
7
+
8
+ void main () {
9
+ testWidgets ('It should show the home page' , (WidgetTester tester) async {
10
+ await tester.pumpWidget (
11
+ const example.NavigatorExampleApp (),
12
+ );
13
+
14
+ expect (find.text ('Home Page' ), findsOne);
15
+ });
16
+
17
+ testWidgets ('It should start from the sign up page and follow the flow to reach the home page' , (WidgetTester tester) async {
18
+ tester.platformDispatcher.defaultRouteNameTestValue = '/signup' ;
19
+ await tester.pumpWidget (
20
+ const example.NavigatorExampleApp (),
21
+ );
22
+
23
+ expect (find.text ('Collect Personal Info Page' ), findsOne);
24
+
25
+ await tester.tap (find.text ('Collect Personal Info Page' ));
26
+ await tester.pumpAndSettle ();
27
+
28
+ expect (find.text ('Choose Credentials Page' ), findsOne);
29
+
30
+ await tester.tap (find.text ('Choose Credentials Page' ));
31
+ await tester.pumpAndSettle ();
32
+
33
+ expect (find.text ('Home Page' ), findsOne);
34
+ });
35
+ }
You can’t perform that action at this time.
0 commit comments