File tree Expand file tree Collapse file tree
packages/flutter/test/material Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 6c45fafdf5e3231406e1921285767f6ca8c05d6e
1+ d0800cf4170e77682173c19703f605c6795e0ff8
Original file line number Diff line number Diff line change 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 'dart:io' ;
56import 'dart:ui' ;
67
78import 'package:flutter/material.dart' ;
@@ -408,4 +409,33 @@ void main() {
408409 expect (shortFAB, findsNothing);
409410 expect (helloWorld, findsOneWidget);
410411 });
412+
413+ // This test prevents https://github.com/flutter/flutter/issues/20483
414+ testWidgets ('Floating Action Button clips ink splash and highlight' , (WidgetTester tester) async {
415+ final GlobalKey key = new GlobalKey ();
416+ await tester.pumpWidget (
417+ new MaterialApp (
418+ home: new Scaffold (
419+ body: new Center (
420+ child: new RepaintBoundary (
421+ key: key,
422+ child: new FloatingActionButton (
423+ onPressed: () {},
424+ child: const Icon (Icons .add),
425+ ),
426+ ),
427+ ),
428+ ),
429+ ),
430+ );
431+
432+ await tester.press (find.byKey (key));
433+ await tester.pump ();
434+ await tester.pump (const Duration (milliseconds: 1000 ));
435+ await expectLater (
436+ find.byKey (key),
437+ matchesGoldenFile ('floating_action_button_test.clip.1.png' ),
438+ skip: ! Platform .isLinux,
439+ );
440+ });
411441}
You can’t perform that action at this time.
0 commit comments