Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
980c8a73
Unverified
Commit
980c8a73
authored
Aug 20, 2018
by
liyuqian
Committed by
GitHub
Aug 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add golden test for clipping (#20750)
For #20483
parent
09fec4c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
goldens.version
bin/internal/goldens.version
+1
-1
floating_action_button_test.dart
...es/flutter/test/material/floating_action_button_test.dart
+30
-0
No files found.
bin/internal/goldens.version
View file @
980c8a73
6c45fafdf5e3231406e1921285767f6ca8c05d6e
d0800cf4170e77682173c19703f605c6795e0ff8
packages/flutter/test/material/floating_action_button_test.dart
View file @
980c8a73
...
...
@@ -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
,
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment