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
fca2ac11
Commit
fca2ac11
authored
Apr 01, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3023 from abarth/add_test
Add a scrolling test now that it passes
parents
0be7a33b
dbb7c2e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
scroll_events_test.dart
packages/flutter/test/widget/scroll_events_test.dart
+19
-0
No files found.
packages/flutter/test/widget/scroll_events_test.dart
View file @
fca2ac11
...
...
@@ -136,4 +136,23 @@ void main() {
expect
(
log
,
equals
([
'scrollstart'
,
'scrollend'
]));
});
});
test
(
'fling up ends'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
GlobalKey
<
ScrollableState
<
Scrollable
>>
scrollKey
=
new
GlobalKey
<
ScrollableState
<
Scrollable
>>();
List
<
String
>
log
=
<
String
>[];
tester
.
pumpWidget
(
_buildScroller
(
key:
scrollKey
,
log:
log
));
expect
(
log
,
equals
([]));
tester
.
flingFrom
(
new
Point
(
100.0
,
100.0
),
new
Offset
(
50.0
,
50.0
),
500.0
);
tester
.
pump
(
new
Duration
(
seconds:
1
));
tester
.
pump
(
new
Duration
(
seconds:
1
));
tester
.
pump
(
new
Duration
(
seconds:
1
));
expect
(
log
.
first
,
equals
(
'scrollstart'
));
expect
(
log
.
last
,
equals
(
'scrollend'
));
log
.
removeWhere
((
String
value
)
=>
value
==
'scroll'
);
expect
(
log
.
length
,
equals
(
2
));
expect
(
scrollKey
.
currentState
.
scrollOffset
,
equals
(
0.0
));
});
});
}
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