File tree 2 files changed +26
-2
lines changed
examples/api/test/material/scaffold
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 3
3
// found in the LICENSE file.
4
4
5
5
// To run this, from the root of the Flutter repository:
6
- // bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/check_code_sample_links .dart
6
+ // bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/check_code_samples .dart
7
7
8
8
import 'dart:io' ;
9
9
@@ -352,7 +352,6 @@ final Set<String> _knownMissingTests = <String>{
352
352
'examples/api/test/material/selection_area/selection_area.0_test.dart' ,
353
353
'examples/api/test/material/scaffold/scaffold.end_drawer.0_test.dart' ,
354
354
'examples/api/test/material/scaffold/scaffold.drawer.0_test.dart' ,
355
- 'examples/api/test/material/scaffold/scaffold.1_test.dart' ,
356
355
'examples/api/test/material/scaffold/scaffold.of.0_test.dart' ,
357
356
'examples/api/test/material/scaffold/scaffold_messenger.of.0_test.dart' ,
358
357
'examples/api/test/material/scaffold/scaffold_messenger.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/material.dart' ;
6
+ import 'package:flutter_api_samples/material/scaffold/scaffold.1.dart' as example;
7
+ import 'package:flutter_test/flutter_test.dart' ;
8
+
9
+ void main () {
10
+ testWidgets ('The count should be incremented when the floating action button is tapped' , (WidgetTester tester) async {
11
+ await tester.pumpWidget (
12
+ const example.ScaffoldExampleApp (),
13
+ );
14
+
15
+ expect (find.widgetWithText (AppBar , 'Sample Code' ), findsOne);
16
+ expect (find.widgetWithIcon (FloatingActionButton , Icons .add), findsOne);
17
+ expect (find.text ('You have pressed the button 0 times.' ), findsOne);
18
+
19
+ for (int i = 1 ; i <= 5 ; i++ ) {
20
+ await tester.tap (find.byType (FloatingActionButton ));
21
+ await tester.pump ();
22
+ expect (find.text ('You have pressed the button $i times.' ), findsOne);
23
+ }
24
+ });
25
+ }
You can’t perform that action at this time.
0 commit comments