File tree Expand file tree Collapse file tree 5 files changed +52
-0
lines changed
packages/integration_test Expand file tree Collapse file tree 5 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ dependencies:
3838 vector_math : 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
3939 webdriver : 3.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
4040
41+ dev_dependencies :
42+ flutter_goldens :
43+ sdk : flutter
44+
4145flutter :
4246 plugin :
4347 platforms :
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+ export 'package:flutter_goldens/flutter_goldens.dart' show testExecutable;
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 'dart:async' ;
6+
7+ // package:flutter_goldens is not used as part of the test process for web.
8+ Future <void > testExecutable (FutureOr <void > Function () testMain, {String ? namePrefix}) async => testMain ();
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 'dart:async' ;
6+
7+ import '_goldens_io.dart' if (dart.library.js_interop) '_goldens_web.dart' as flutter_goldens;
8+
9+ Future <void > testExecutable (FutureOr <void > Function () testMain) {
10+ // Enable golden file testing using Skia Gold.
11+ return flutter_goldens.testExecutable (testMain, namePrefix: 'integration' );
12+ }
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+ @Tags (< String > ['reduced-test-set' ])
6+ library ;
7+
8+ import 'package:flutter/material.dart' ;
9+ import 'package:flutter_test/flutter_test.dart' ;
10+ import 'package:integration_test/integration_test.dart' ;
11+
12+ void main () {
13+ IntegrationTestWidgetsFlutterBinding .ensureInitialized ();
14+
15+ testWidgets ('a screenshot of a Placeholder' , (WidgetTester tester) async {
16+ await tester.pumpWidget (const Placeholder ());
17+
18+ await expectLater (
19+ find.byType (Placeholder ),
20+ matchesGoldenFile ('placeholder.png' ),
21+ );
22+ });
23+ }
You can’t perform that action at this time.
0 commit comments