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
820a009f
Unverified
Commit
820a009f
authored
Sep 07, 2022
by
Yegor
Committed by
GitHub
Sep 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[web] skip flaky date picker golden tests (#111114)
parent
4453ba0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
date_picker_test.dart
packages/flutter/test/cupertino/date_picker_test.dart
+27
-16
No files found.
packages/flutter/test/cupertino/date_picker_test.dart
View file @
820a009f
...
...
@@ -19,6 +19,9 @@ import 'package:flutter/material.dart';
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
// TODO(yjbanov): on the web text rendered with perspective produces flaky goldens: https://github.com/flutter/flutter/issues/110785
const
bool
skipPerspectiveTextGoldens
=
isBrowser
;
// A number of the hit tests below say "warnIfMissed: false". This is because
// the way the CupertinoPicker works, the hits don't actually reach the labels,
// the scroll view intercepts them.
...
...
@@ -1194,31 +1197,39 @@ void main() {
}
await
tester
.
pumpWidget
(
buildApp
(
CupertinoDatePickerMode
.
time
));
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.time.initial.png'
),
);
if
(!
skipPerspectiveTextGoldens
)
{
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.time.initial.png'
),
);
}
await
tester
.
pumpWidget
(
buildApp
(
CupertinoDatePickerMode
.
date
));
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.date.initial.png'
),
);
if
(!
skipPerspectiveTextGoldens
)
{
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.date.initial.png'
),
);
}
await
tester
.
pumpWidget
(
buildApp
(
CupertinoDatePickerMode
.
dateAndTime
));
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.initial.png'
),
);
if
(!
skipPerspectiveTextGoldens
)
{
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.initial.png'
),
);
}
// Slightly drag the hour component to make the current hour off-center.
await
tester
.
drag
(
find
.
text
(
'4'
),
Offset
(
0
,
_kRowOffset
.
dy
/
2
),
warnIfMissed:
false
);
// see top of file
await
tester
.
pump
();
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.drag.png'
),
);
if
(!
skipPerspectiveTextGoldens
)
{
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.drag.png'
),
);
}
});
testWidgets
(
'DatePicker displays the date in correct order'
,
(
WidgetTester
tester
)
async
{
...
...
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