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
fc779c69
Unverified
Commit
fc779c69
authored
Jan 16, 2019
by
Gary Qian
Committed by
GitHub
Jan 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Golden test for background painting order. (#25988)
parent
29928a46
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletion
+51
-1
goldens.version
bin/internal/goldens.version
+1
-1
text_golden_test.dart
packages/flutter/test/widgets/text_golden_test.dart
+50
-0
No files found.
bin/internal/goldens.version
View file @
fc779c69
7e3f945a906f9f1ffdcb1edba870f4533d2c2b86
02905560cf2c2132a7adea10943001f29325f3be
packages/flutter/test/widgets/text_golden_test.dart
View file @
fc779c69
...
...
@@ -135,6 +135,56 @@ void main() {
);
},
skip:
!
Platform
.
isLinux
);
// TODO(garyq): This test requires an update when the background
// drawing from the beginning of the line bug is fixed. The current
// tested version is not completely correct.
testWidgets
(
'Text Background'
,
(
WidgetTester
tester
)
async
{
const
Color
red
=
Colors
.
red
;
const
Color
blue
=
Colors
.
blue
;
const
Color
translucentGreen
=
Color
(
0x5000F000
);
const
Color
translucentDarkRed
=
Color
(
0x500F0000
);
await
tester
.
pumpWidget
(
Align
(
alignment:
Alignment
.
topLeft
,
child:
RepaintBoundary
(
child:
Container
(
width:
200.0
,
height:
100.0
,
decoration:
const
BoxDecoration
(
color:
Colors
.
green
,
),
child:
RichText
(
textDirection:
TextDirection
.
ltr
,
text:
TextSpan
(
text:
'text1 '
,
style:
TextStyle
(
color:
translucentGreen
,
background:
Paint
()
..
color
=
red
.
withOpacity
(
0.5
)
),
children:
<
TextSpan
>[
TextSpan
(
text:
'text2'
,
style:
TextStyle
(
color:
translucentDarkRed
,
background:
Paint
()
..
color
=
blue
.
withOpacity
(
0.5
)
)
),
],
),
),
),
),
),
);
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'text_golden.Background.png'
),
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Text Fade'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
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