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
41325b56
Unverified
Commit
41325b56
authored
Oct 08, 2020
by
xster
Committed by
GitHub
Oct 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn timer_picker_test goldens back on (#67555)
parent
d127f2c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
date_picker_test.dart
packages/flutter/test/cupertino/date_picker_test.dart
+42
-42
No files found.
packages/flutter/test/cupertino/date_picker_test.dart
View file @
41325b56
...
...
@@ -1206,48 +1206,48 @@ void main() {
});
});
//
testWidgets('TimerPicker golden tests', (WidgetTester tester) async {
//
await tester.pumpWidget(
//
CupertinoApp(
//
// Also check if the picker respects the theme.
//
theme: const CupertinoThemeData(
//
textTheme: CupertinoTextThemeData(
//
pickerTextStyle: TextStyle(
//
color: Color(0xFF663311),
//
fontSize: 21,
//
),
//
),
//
),
//
home: Center(
//
child: SizedBox(
//
width: 320,
//
height: 216,
//
child: RepaintBoundary(
//
child: CupertinoTimerPicker(
//
mode: CupertinoTimerPickerMode.hm,
//
initialTimerDuration: const Duration(hours: 23, minutes: 59),
//
onTimerDurationChanged: (_) {},
//
),
//
),
//
),
//
),
//
),
//
);
//
//
await expectLater(
//
find.byType(CupertinoTimerPicker),
//
matchesGoldenFile('timer_picker_test.datetime.initial.png'),
//
);
//
//
// Slightly drag the minute component to make the current minute off-center.
//
await tester.drag(find.text('59'), Offset(0, _kRowOffset.dy / 2));
//
await tester.pump();
//
//
await expectLater(
//
find.byType(CupertinoTimerPicker),
//
matchesGoldenFile('timer_picker_test.datetime.drag.png'),
//
);
//
});
testWidgets
(
'TimerPicker golden tests'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
// Also check if the picker respects the theme.
theme:
const
CupertinoThemeData
(
textTheme:
CupertinoTextThemeData
(
pickerTextStyle:
TextStyle
(
color:
Color
(
0xFF663311
),
fontSize:
21
,
),
),
),
home:
Center
(
child:
SizedBox
(
width:
320
,
height:
216
,
child:
RepaintBoundary
(
child:
CupertinoTimerPicker
(
mode:
CupertinoTimerPickerMode
.
hm
,
initialTimerDuration:
const
Duration
(
hours:
23
,
minutes:
59
),
onTimerDurationChanged:
(
_
)
{},
),
),
),
),
),
);
await
expectLater
(
find
.
byType
(
CupertinoTimerPicker
),
matchesGoldenFile
(
'timer_picker_test.datetime.initial.png'
),
);
// Slightly drag the minute component to make the current minute off-center.
await
tester
.
drag
(
find
.
text
(
'59'
),
Offset
(
0
,
_kRowOffset
.
dy
/
2
));
await
tester
.
pump
();
await
expectLater
(
find
.
byType
(
CupertinoTimerPicker
),
matchesGoldenFile
(
'timer_picker_test.datetime.drag.png'
),
);
});
testWidgets
(
'TimerPicker only changes hour label after scrolling stops'
,
(
WidgetTester
tester
)
async
{
Duration
?
duration
;
...
...
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