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
86f069f1
Unverified
Commit
86f069f1
authored
Oct 16, 2019
by
Yegor
Committed by
GitHub
Oct 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add most of the widget tests; add more web test shards (#42807)
parent
a665393a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
12 deletions
+56
-12
.cirrus.yml
.cirrus.yml
+30
-0
test.dart
dev/bots/test.dart
+24
-11
html_element_view_test.dart
packages/flutter/test/widgets/html_element_view_test.dart
+2
-1
No files found.
.cirrus.yml
View file @
86f069f1
...
...
@@ -182,6 +182,36 @@ task:
container
:
cpu
:
4
memory
:
12G
-
name
:
web_tests-linux-shard-3
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
3
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
web_tests-linux-shard-4
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
4
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
web_tests-linux-shard-5
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
5
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
build_tests-linux
env
:
SHARD
:
build_tests
...
...
dev/bots/test.dart
View file @
86f069f1
...
...
@@ -434,23 +434,35 @@ Future<void> _runTests() async {
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
}
Future
<
void
>
_runWebTests
()
async
{
final
Directory
flutterPackageDir
=
Directory
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
final
Directory
testDir
=
Directory
(
path
.
join
(
flutterPackageDir
.
path
,
'test'
));
// TODO(yjbanov): we're getting rid of this blacklist as part of https://github.com/flutter/flutter/projects/60
const
List
<
String
>
kBlacklist
=
<
String
>[
// TODO(yjbanov): we're getting rid of these blacklists as part of https://github.com/flutter/flutter/projects/60
const
List
<
String
>
kWebTestDirectoryBlacklist
=
<
String
>[
'test/cupertino'
,
'test/examples'
,
'test/material'
,
'test/widgets'
,
];
];
const
List
<
String
>
kWebTestFileBlacklist
=
<
String
>[
'test/widgets/heroes_test.dart'
,
'test/widgets/text_test.dart'
,
'test/widgets/selectable_text_test.dart'
,
'test/widgets/color_filter_test.dart'
,
'test/widgets/editable_text_cursor_test.dart'
,
'test/widgets/shadow_test.dart'
,
'test/widgets/raw_keyboard_listener_test.dart'
,
'test/widgets/editable_text_test.dart'
,
'test/widgets/widget_inspector_test.dart'
,
'test/widgets/draggable_test.dart'
,
'test/widgets/shortcuts_test.dart'
,
];
Future
<
void
>
_runWebTests
()
async
{
final
Directory
flutterPackageDir
=
Directory
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
final
Directory
testDir
=
Directory
(
path
.
join
(
flutterPackageDir
.
path
,
'test'
));
final
List
<
String
>
directories
=
testDir
.
listSync
()
.
whereType
<
Directory
>()
.
map
<
String
>((
Directory
dir
)
=>
path
.
relative
(
dir
.
path
,
from:
flutterPackageDir
.
path
))
.
where
((
String
relativePath
)
=>
!
kBlacklist
.
contains
(
relativePath
))
.
where
((
String
relativePath
)
=>
!
k
WebTestDirectory
Blacklist
.
contains
(
relativePath
))
.
toList
();
await
_runFlutterWebTest
(
flutterPackageDir
.
path
,
tests:
directories
);
...
...
@@ -687,7 +699,7 @@ class EvalResult {
///
/// WARNING: if you change this number, also change .cirrus.yml
/// and make sure it runs _all_ shards.
const
int
_kWebShardCount
=
3
;
const
int
_kWebShardCount
=
6
;
Future
<
void
>
_runFlutterWebTest
(
String
workingDirectory
,
{
List
<
String
>
tests
,
...
...
@@ -699,7 +711,8 @@ Future<void> _runFlutterWebTest(String workingDirectory, {
testDir
.
listSync
(
recursive:
true
)
.
whereType
<
File
>()
.
where
((
File
file
)
=>
file
.
path
.
endsWith
(
'_test.dart'
))
.
map
((
File
file
)
=>
path
.
relative
(
file
.
path
,
from:
workingDirectory
))
.
map
<
String
>((
File
file
)
=>
path
.
relative
(
file
.
path
,
from:
workingDirectory
))
.
where
((
String
filePath
)
=>
!
kWebTestFileBlacklist
.
contains
(
filePath
)),
);
}
...
...
packages/flutter/test/widgets/html_element_view_test.dart
View file @
86f069f1
...
...
@@ -196,7 +196,8 @@ void main() {
// is not yet in the tree.
await
tester
.
pump
();
final
SemanticsNode
semantics
=
tester
.
getSemantics
(
find
.
byType
(
HtmlElementView
));
// The platform view ID is set on the child of the HtmlElementView render object.
final
SemanticsNode
semantics
=
tester
.
getSemantics
(
find
.
byType
(
PlatformViewSurface
));
expect
(
semantics
.
platformViewId
,
currentViewId
+
1
);
expect
(
semantics
.
rect
,
const
Rect
.
fromLTWH
(
0
,
0
,
200
,
100
));
...
...
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