diff --git a/bin/internal/goldens.version b/bin/internal/goldens.version index 8a12df1eda..935ebb2df6 100644 --- a/bin/internal/goldens.version +++ b/bin/internal/goldens.version @@ -1 +1 @@ -6c45fafdf5e3231406e1921285767f6ca8c05d6e +d0800cf4170e77682173c19703f605c6795e0ff8 diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index 75c84fe357..f50f3e16a4 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io'; import 'dart:ui'; import 'package:flutter/material.dart'; @@ -408,4 +409,33 @@ void main() { expect(shortFAB, findsNothing); expect(helloWorld, findsOneWidget); }); + + // This test prevents https://github.com/flutter/flutter/issues/20483 + testWidgets('Floating Action Button clips ink splash and highlight', (WidgetTester tester) async { + final GlobalKey key = new GlobalKey(); + await tester.pumpWidget( + new MaterialApp( + home: new Scaffold( + body: new Center( + child: new RepaintBoundary( + key: key, + child: new FloatingActionButton( + onPressed: () {}, + child: const Icon(Icons.add), + ), + ), + ), + ), + ), + ); + + await tester.press(find.byKey(key)); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 1000)); + await expectLater( + find.byKey(key), + matchesGoldenFile('floating_action_button_test.clip.1.png'), + skip: !Platform.isLinux, + ); + }); }