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
305a855f
Unverified
Commit
305a855f
authored
Oct 20, 2021
by
Jenn Magder
Committed by
GitHub
Oct 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate integration test shard test data to null safety (#92147)
parent
12ec91a5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
156 additions
and
156 deletions
+156
-156
deferred_components_config.dart
...tegration.shard/test_data/deferred_components_config.dart
+4
-5
test_driver.dart
...ges/flutter_tools/test/integration.shard/test_driver.dart
+146
-142
test_utils.dart
...ages/flutter_tools/test/integration.shard/test_utils.dart
+6
-9
No files found.
packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart
View file @
305a855f
...
...
@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/file.dart'
;
import
'../test_utils.dart'
;
abstract
class
DeferredComponentsConfig
{
String
get
deferredLibrary
;
String
get
deferredComponentsGolden
;
String
?
get
deferredComponentsGolden
;
String
get
androidSettings
;
String
get
androidBuild
;
String
get
androidLocalProperties
;
...
...
@@ -30,8 +28,9 @@ abstract class DeferredComponentsConfig {
if
(
deferredLibrary
!=
null
)
{
writeFile
(
fileSystem
.
path
.
join
(
dir
.
path
,
'lib'
,
'deferred_library.dart'
),
deferredLibrary
);
}
if
(
deferredComponentsGolden
!=
null
)
{
writeFile
(
fileSystem
.
path
.
join
(
dir
.
path
,
'deferred_components_loading_units.yaml'
),
deferredComponentsGolden
);
final
String
?
golden
=
deferredComponentsGolden
;
if
(
golden
!=
null
)
{
writeFile
(
fileSystem
.
path
.
join
(
dir
.
path
,
'deferred_components_loading_units.yaml'
),
golden
);
}
if
(
androidSettings
!=
null
)
{
writeFile
(
fileSystem
.
path
.
join
(
dir
.
path
,
'android'
,
'settings.gradle'
),
androidSettings
);
...
...
packages/flutter_tools/test/integration.shard/test_driver.dart
View file @
305a855f
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/integration.shard/test_utils.dart
View file @
305a855f
...
...
@@ -2,13 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/file.dart'
;
import
'package:file/local.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:meta/meta.dart'
;
import
'package:process/process.dart'
;
import
'package:vm_service/vm_service.dart'
;
...
...
@@ -91,18 +88,18 @@ List<String> getLocalEngineArguments() {
}
Future
<
void
>
pollForServiceExtensionValue
<
T
>({
@
required
FlutterTestDriver
testDriver
,
@
required
String
extension
,
@
required
T
continuePollingValue
,
@
required
Matcher
matches
,
required
FlutterTestDriver
testDriver
,
required
String
extension
,
required
T
continuePollingValue
,
required
Matcher
matches
,
String
valueKey
=
'value'
,
})
async
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
final
Response
response
=
await
testDriver
.
callServiceExtension
(
extension
);
if
(
response
.
json
[
valueKey
]
as
T
==
continuePollingValue
)
{
if
(
response
.
json
?
[
valueKey
]
as
T
==
continuePollingValue
)
{
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
}
else
{
expect
(
response
.
json
[
valueKey
]
as
T
,
matches
);
expect
(
response
.
json
?
[
valueKey
]
as
T
,
matches
);
return
;
}
}
...
...
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