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
9f34e2e4
Commit
9f34e2e4
authored
Apr 12, 2017
by
Hans Muller
Committed by
GitHub
Apr 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Point to Offset (#9355)
parent
28bb89c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app_bar_test.dart
packages/flutter/test/material/app_bar_test.dart
+6
-6
No files found.
packages/flutter/test/material/app_bar_test.dart
View file @
9f34e2e4
...
@@ -46,8 +46,8 @@ bool appBarIsVisible(WidgetTester tester) {
...
@@ -46,8 +46,8 @@ bool appBarIsVisible(WidgetTester tester) {
}
}
double
appBarHeight
(
WidgetTester
tester
)
=>
tester
.
getSize
(
find
.
byType
(
AppBar
)).
height
;
double
appBarHeight
(
WidgetTester
tester
)
=>
tester
.
getSize
(
find
.
byType
(
AppBar
)).
height
;
double
appBarTop
(
WidgetTester
tester
)
=>
tester
.
getTopLeft
(
find
.
byType
(
AppBar
)).
y
;
double
appBarTop
(
WidgetTester
tester
)
=>
tester
.
getTopLeft
(
find
.
byType
(
AppBar
)).
d
y
;
double
appBarBottom
(
WidgetTester
tester
)
=>
tester
.
getBottomLeft
(
find
.
byType
(
AppBar
)).
y
;
double
appBarBottom
(
WidgetTester
tester
)
=>
tester
.
getBottomLeft
(
find
.
byType
(
AppBar
)).
d
y
;
double
tabBarHeight
(
WidgetTester
tester
)
=>
tester
.
getSize
(
find
.
byType
(
TabBar
)).
height
;
double
tabBarHeight
(
WidgetTester
tester
)
=>
tester
.
getSize
(
find
.
byType
(
TabBar
)).
height
;
...
@@ -492,7 +492,7 @@ void main() {
...
@@ -492,7 +492,7 @@ void main() {
// Drag the scrollable up and down. The app bar should not snap open, its
// Drag the scrollable up and down. The app bar should not snap open, its
// height should just track the the drag offset.
// height should just track the the drag offset.
TestGesture
gesture
=
await
tester
.
startGesture
(
const
Poin
t
(
50.0
,
256.0
));
TestGesture
gesture
=
await
tester
.
startGesture
(
const
Offse
t
(
50.0
,
256.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
128.0
));
// drag the appbar all the way open
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
128.0
));
// drag the appbar all the way open
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
appBarTop
(
tester
),
0.0
);
expect
(
appBarTop
(
tester
),
0.0
);
...
@@ -523,7 +523,7 @@ void main() {
...
@@ -523,7 +523,7 @@ void main() {
// Now that the app bar is open, perform the same drag scenario
// Now that the app bar is open, perform the same drag scenario
// in reverse: drag the appbar up and down and then trigger the
// in reverse: drag the appbar up and down and then trigger the
// snap closed animation.
// snap closed animation.
gesture
=
await
tester
.
startGesture
(
const
Poin
t
(
50.0
,
256.0
));
gesture
=
await
tester
.
startGesture
(
const
Offse
t
(
50.0
,
256.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
-
128.0
));
// drag the appbar closed
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
-
128.0
));
// drag the appbar closed
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
appBarBottom
(
tester
),
0.0
);
expect
(
appBarBottom
(
tester
),
0.0
);
...
@@ -575,7 +575,7 @@ void main() {
...
@@ -575,7 +575,7 @@ void main() {
// Drag the scrollable up and down. The app bar should not snap open, the
// Drag the scrollable up and down. The app bar should not snap open, the
// bottof of the appbar should just track the drag offset.
// bottof of the appbar should just track the drag offset.
TestGesture
gesture
=
await
tester
.
startGesture
(
const
Poin
t
(
50.0
,
200.0
));
TestGesture
gesture
=
await
tester
.
startGesture
(
const
Offse
t
(
50.0
,
200.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
100.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
100.0
));
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
appBarHeight
(
tester
),
100.0
);
expect
(
appBarHeight
(
tester
),
100.0
);
...
@@ -609,7 +609,7 @@ void main() {
...
@@ -609,7 +609,7 @@ void main() {
// Now that the appbar is fully expanded, Perform the same drag
// Now that the appbar is fully expanded, Perform the same drag
// scenario in reverse: drag the appbar up and down and then trigger
// scenario in reverse: drag the appbar up and down and then trigger
// the snap closed animation.
// the snap closed animation.
gesture
=
await
tester
.
startGesture
(
const
Poin
t
(
50.0
,
256.0
));
gesture
=
await
tester
.
startGesture
(
const
Offse
t
(
50.0
,
256.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
-
128.0
));
await
gesture
.
moveBy
(
const
Offset
(
0.0
,
-
128.0
));
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
appBarBottom
(
tester
),
kTextTabBarHeight
);
expect
(
appBarBottom
(
tester
),
kTextTabBarHeight
);
...
...
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