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
65ca3870
Commit
65ca3870
authored
Jan 28, 2017
by
Ian Hickson
Committed by
GitHub
Jan 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the Ahem font available to tests. (#7725)
parent
96e11e1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+5
-5
buttons_test.dart
packages/flutter/test/widgets/buttons_test.dart
+2
-2
test.dart
packages/flutter_tools/lib/src/commands/test.dart
+1
-1
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+1
-0
No files found.
packages/flutter/test/material/tabs_test.dart
View file @
65ca3870
...
...
@@ -188,19 +188,19 @@ void main() {
testWidgets
(
'TabBar can be scrolled independent of the selection'
,
(
WidgetTester
tester
)
async
{
List
<
String
>
tabs
=
<
String
>[
'AAAA
AA'
,
'BBBBBB'
,
'CCCCCC'
,
'DDDDDD'
,
'EEEEEE'
,
'FFFFFF'
,
'GGGGGG'
,
'HHHHHH'
,
'IIIIII'
,
'JJJJJJ'
,
'KKKKKK'
,
'LL
LLLL'
];
List
<
String
>
tabs
=
<
String
>[
'AAAA
'
,
'BBBB'
,
'CCCC'
,
'DDDD'
,
'EEEE'
,
'FFFF'
,
'GGGG'
,
'HHHH'
,
'IIII'
,
'JJJJ'
,
'KKKK'
,
'
LLLL'
];
Key
tabBarKey
=
new
Key
(
'TabBar'
);
await
tester
.
pumpWidget
(
buildFrame
(
tabs:
tabs
,
value:
'AAAA
AA
'
,
isScrollable:
true
,
tabBarKey:
tabBarKey
));
TabController
controller
=
DefaultTabController
.
of
(
tester
.
element
(
find
.
text
(
'AAAA
AA
'
)));
await
tester
.
pumpWidget
(
buildFrame
(
tabs:
tabs
,
value:
'AAAA'
,
isScrollable:
true
,
tabBarKey:
tabBarKey
));
TabController
controller
=
DefaultTabController
.
of
(
tester
.
element
(
find
.
text
(
'AAAA'
)));
expect
(
controller
,
isNotNull
);
expect
(
controller
.
index
,
0
);
// Fling-scroll the TabBar to the left
expect
(
tester
.
getCenter
(
find
.
text
(
'HHHH
HH
'
)).
x
,
lessThan
(
700.0
));
expect
(
tester
.
getCenter
(
find
.
text
(
'HHHH'
)).
x
,
lessThan
(
700.0
));
await
tester
.
fling
(
find
.
byKey
(
tabBarKey
),
const
Offset
(-
200.0
,
0.0
),
10000.0
);
await
tester
.
pump
();
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
// finish the scroll animation
expect
(
tester
.
getCenter
(
find
.
text
(
'HHHH
HH
'
)).
x
,
lessThan
(
500.0
));
expect
(
tester
.
getCenter
(
find
.
text
(
'HHHH'
)).
x
,
lessThan
(
500.0
));
// Scrolling the TabBar doesn't change the selection
expect
(
controller
.
index
,
0
);
...
...
packages/flutter/test/widgets/buttons_test.dart
View file @
65ca3870
...
...
@@ -17,7 +17,7 @@ void main() {
child:
new
Center
(
child:
new
FlatButton
(
onPressed:
()
{
},
child:
new
Text
(
'
Hello
'
)
child:
new
Text
(
'
ABC
'
)
)
)
)
...
...
@@ -30,7 +30,7 @@ void main() {
new
TestSemantics
(
id:
1
,
actions:
SemanticsAction
.
tap
.
index
,
label:
'
Hello
'
,
label:
'
ABC
'
,
rect:
new
Rect
.
fromLTRB
(
0.0
,
0.0
,
88.0
,
36.0
),
transform:
new
Matrix4
.
translationValues
(
356.0
,
282.0
,
0.0
)
)
...
...
packages/flutter_tools/lib/src/commands/test.dart
View file @
65ca3870
...
...
@@ -173,7 +173,7 @@ class TestCommand extends FlutterCommand {
testArgs
.
add
(
'--'
);
Directory
testDir
;
List
<
String
>
files
=
argResults
.
rest
.
map
((
String
testPath
)
=>
path
.
absolute
(
testPath
)).
toList
();
Iterable
<
String
>
files
=
argResults
.
rest
.
map
((
String
testPath
)
=>
path
.
absolute
(
testPath
)).
toList
();
if
(
argResults
[
'start-paused'
])
{
if
(
files
.
length
!=
1
)
throwToolExit
(
'When using --start-paused, you must specify a single test file to run.'
,
exitCode:
1
);
...
...
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
65ca3870
...
...
@@ -451,6 +451,7 @@ void main() {
'--enable-dart-profiling'
,
'--non-interactive'
,
'--enable-checked-mode'
,
'--use-test-fonts'
,
'--packages=
$packages
'
,
testPath
,
]);
...
...
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