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
6839b3cb
Unverified
Commit
6839b3cb
authored
Apr 11, 2023
by
pdblasi-google
Committed by
GitHub
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds `dart_fix` support to `flutter_test` (#124347)
Adds `dart_fix` support to `flutter_test`
parent
be2aa1c2
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
486 additions
and
4 deletions
+486
-4
test.dart
dev/bots/test.dart
+4
-3
README.md
packages/flutter/lib/fix_data/README.md
+1
-1
analysis_options.yaml
packages/flutter_test/analysis_options.yaml
+5
-0
README.md
packages/flutter_test/lib/fix_data/README.md
+45
-0
fix_animation_sheet_builder.yaml
...ix_data/fix_flutter_test/fix_animation_sheet_builder.yaml
+42
-0
fix_automated_test_widgets_flutter_binding.yaml
...x_binding/fix_automated_test_widgets_flutter_binding.yaml
+32
-0
fix_live_test_widgets_flutter_binding.yaml
...st/fix_binding/fix_live_test_widgets_flutter_binding.yaml
+32
-0
fix_test_widgets_flutter_binding.yaml
...er_test/fix_binding/fix_test_widgets_flutter_binding.yaml
+45
-0
fix_widget_tester.yaml
...test/lib/fix_data/fix_flutter_test/fix_widget_tester.yaml
+51
-0
template.yaml
packages/flutter_test/lib/fix_data/template.yaml
+25
-0
binding.dart
packages/flutter_test/lib/src/binding.dart
+6
-0
.dartignore
packages/flutter_test/test_fixes/.dartignore
+0
-0
analysis_options.yaml
packages/flutter_test/test_fixes/analysis_options.yaml
+1
-0
animation_sheet_builder.dart
...test/test_fixes/flutter_test/animation_sheet_builder.dart
+23
-0
animation_sheet_builder.dart.expect
...st_fixes/flutter_test/animation_sheet_builder.dart.expect
+23
-0
automated_test_widgets_flutter_binding.dart
..._test/binding/automated_test_widgets_flutter_binding.dart
+15
-0
automated_test_widgets_flutter_binding.dart.expect
...inding/automated_test_widgets_flutter_binding.dart.expect
+13
-0
live_test_widgets_flutter_binding.dart
...utter_test/binding/live_test_widgets_flutter_binding.dart
+15
-0
live_test_widgets_flutter_binding.dart.expect
...est/binding/live_test_widgets_flutter_binding.dart.expect
+13
-0
test_widgets_flutter_binding.dart
...es/flutter_test/binding/test_widgets_flutter_binding.dart
+28
-0
test_widgets_flutter_binding.dart.expect
...ter_test/binding/test_widgets_flutter_binding.dart.expect
+20
-0
widget_tester.dart
...s/flutter_test/test_fixes/flutter_test/widget_tester.dart
+24
-0
widget_tester.dart.expect
...er_test/test_fixes/flutter_test/widget_tester.dart.expect
+23
-0
No files found.
dev/bots/test.dart
View file @
6839b3cb
...
...
@@ -927,7 +927,7 @@ Future<void> _runFrameworkTests() async {
}
}
Future
<
void
>
runFixTests
()
async
{
Future
<
void
>
runFixTests
(
String
package
)
async
{
final
List
<
String
>
args
=
<
String
>[
'fix'
,
'--compare-to-golden'
,
...
...
@@ -935,7 +935,7 @@ Future<void> _runFrameworkTests() async {
await
runCommand
(
dart
,
args
,
workingDirectory:
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
,
'test_fixes'
),
workingDirectory:
path
.
join
(
flutterRoot
,
'packages'
,
package
,
'test_fixes'
),
);
}
...
...
@@ -965,7 +965,8 @@ Future<void> _runFrameworkTests() async {
Future
<
void
>
runSlow
()
async
{
printProgress
(
'
${green}
Running slow package tests
$reset
for directories other than packages/flutter'
);
await
runTracingTests
();
await
runFixTests
();
await
runFixTests
(
'flutter'
);
await
runFixTests
(
'flutter_test'
);
await
runPrivateTests
();
}
...
...
packages/flutter/lib/fix_data/README.md
View file @
6839b3cb
...
...
@@ -5,7 +5,7 @@ define the [`dart fix` framework](https://dart.dev/tools/dart-fix) refactorings
used by the Flutter framework.
The number of fix rules defined in a file should not exceed 50 for better
maintainability. Searching for
`title:`
i
s
a given
`.yaml`
file will account
maintainability. Searching for
`title:`
i
n
a given
`.yaml`
file will account
for the number of fixes. Splitting out fix rules should be done by class.
When adding a new
`.yaml`
file, make a copy of
`fix_template.yaml`
. If the new
...
...
packages/flutter_test/analysis_options.yaml
0 → 100644
View file @
6839b3cb
include
:
../analysis_options.yaml
analyzer
:
exclude
:
-
"
test_fixes/**"
packages/flutter_test/lib/fix_data/README.md
0 → 100644
View file @
6839b3cb
## Directory contents
The
`.yaml`
files in these directories are used to
define the
[
`dart fix` framework
](
https://dart.dev/tools/dart-fix
)
refactorings
used by
`flutter_test`
.
The number of fix rules defined in a file should not exceed 50 for better
maintainability. Searching for
`title:`
in a given
`.yaml`
file will account
for the number of fixes. Splitting out fix rules should be done by class.
When adding a new
`.yaml`
file, make a copy of
`template.yaml`
. Each file should
be for a single class and named
`fix_<class>.yaml`
. To make sure each file is
grouped with related classes, a
`fix_<filename>`
folder will contain all of the
fix files for the individual classes.
See the flutter/packages/flutter_test/test_fixes directory for the tests that
validate these fix rules.
To run these tests locally, execute this command in the
flutter/packages/flutter_test/test_fixes directory.
```
sh
dart fix
--compare-to-golden
```
For more documentation about Data Driven Fixes, see
https://dart.dev/go/data-driven-fixes#test-folder.
To learn more about how fixes are authored in package:flutter_test, see
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
## When making structural changes to this directory
The tests in this directory are also invoked from external
repositories. Specifically, the CI system for the dart-lang/sdk repo
runs these tests in order to ensure that changes to the dart fix file
format do not break Flutter.
See
[
tools/bots/flutter/analyze_flutter_flutter.sh
](
https://github.com/dart-lang/sdk/blob/main/tools/bots/flutter/analyze_flutter_flutter.sh
)
for where the flutter fix tests are invoked for the dart repo.
See
[
dev/bots/test.dart
](
https://github.com/flutter/flutter/blob/master/dev/bots/test.dart
)
for where the flutter fix tests are invoked for the flutter/flutter repo.
When possible, please coordinate changes to this directory that might affect the
`analyze_flutter_flutter.sh`
script.
packages/flutter_test/lib/fix_data/fix_flutter_test/fix_animation_sheet_builder.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for AnimationSheetBuilder from the flutter_test/animation_sheet.dart file. *
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/83337
# The related deprecation for `sheetSize` doesn't have a fix because there
# isn't an alternative API, it's being removed completely.
-
title
:
'
Migrate
to
collate'
date
:
2023-03-29
element
:
uris
:
[
'
flutter_test.dart'
]
method
:
'
display'
inClass
:
'
AnimationSheetBuilder'
changes
:
-
kind
:
'
rename'
newName
:
'
collate'
-
kind
:
'
removeParameter'
name
:
'
key'
-
kind
:
'
addParameter'
index
:
0
name
:
'
cellsPerRow'
style
:
'
required_positional'
argumentValue
:
expression
:
'
1'
packages/flutter_test/lib/fix_data/fix_flutter_test/fix_binding/fix_automated_test_widgets_flutter_binding.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for AutomatedTestWidgetsFlutterBinding from the flutter_test/binding.dart file. *
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/89952
-
title
:
"
Remove
timeout"
date
:
2023-03-30
element
:
uris
:
[
'
flutter_test.dart'
]
method
:
'
runTest'
inClass
:
'
AutomatedTestWidgetsFlutterBinding'
changes
:
-
kind
:
'
removeParameter'
name
:
'
timeout'
packages/flutter_test/lib/fix_data/fix_flutter_test/fix_binding/fix_live_test_widgets_flutter_binding.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for LiveTestWidgetsFlutterBinding from the flutter_test/binding.dart file. *
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/89952
-
title
:
"
Remove
timeout"
date
:
2023-03-30
element
:
uris
:
[
'
flutter_test.dart'
]
method
:
'
runTest'
inClass
:
'
LiveTestWidgetsFlutterBinding'
changes
:
-
kind
:
'
removeParameter'
name
:
'
timeout'
packages/flutter_test/lib/fix_data/fix_flutter_test/fix_binding/fix_test_widgets_flutter_binding.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for TestWidgetsFlutterBinding from the flutter_test/binding.dart file. *
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/89952
-
title
:
"
Remove
timeout"
date
:
2023-03-30
element
:
uris
:
[
'
flutter_test.dart'
]
method
:
'
runTest'
inClass
:
'
TestWidgetsFlutterBinding'
changes
:
-
kind
:
'
removeParameter'
name
:
'
timeout'
# Changes made in https://github.com/flutter/flutter/pull/89952
# The related deprecation for `addTime` doesn't have a fix as the method is
# being removed completely.
-
title
:
"
Remove
additionalTime"
date
:
2023-03-30
element
:
uris
:
[
'
flutter_test.dart'
]
method
:
'
runAsync'
inClass
:
'
TestWidgetsFlutterBinding'
changes
:
-
kind
:
'
removeParameter'
name
:
'
additionalTime'
packages/flutter_test/lib/fix_data/fix_flutter_test/fix_widget_tester.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for the flutter_test/widget_tester.dart file. *
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/89952
-
title
:
"
Migrate
to
timeout"
date
:
2023-03-30
element
:
uris
:
[
'
flutter_test.dart'
]
function
:
'
testWidgets'
oneOf
:
-
if
:
"
initialTimeout
!=
''
&&
timeout
==
''"
changes
:
-
kind
:
'
addParameter'
index
:
3
name
:
'
timeout'
style
:
optional_named
argumentValue
:
expression
:
'
Timeout({%
initialTimeout
%})'
requiredIf
:
"
initialTimeout
!=
''
&&
timeout
==
''"
-
kind
:
'
removeParameter'
name
:
'
initialTimeout'
-
if
:
"
initialTimeout
!=
''
&&
timeout
!=
''"
changes
:
-
kind
:
'
removeParameter'
name
:
'
initialTimeout'
variables
:
initialTimeout
:
kind
:
'
fragment'
value
:
'
arguments[initialTimeout]'
timeout
:
kind
:
'
fragment'
value
:
'
arguments[timeout]'
packages/flutter_test/lib/fix_data/template.yaml
0 → 100644
View file @
6839b3cb
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/flutter_test/lib/fix_data/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are [for CLASS] from the <XXX> library. *
# Uncomment version & transforms, and follow with fixes.
# version: 1
# transforms:
# Before adding a new fix: read instructions at the top of this file.
packages/flutter_test/lib/src/binding.dart
View file @
6839b3cb
...
...
@@ -759,6 +759,8 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
'This parameter has no effect. Use the `timeout` parameter on `testWidgets` instead. '
'This feature was deprecated after v2.6.0-1.0.pre.'
)
// TODO(pdblasi-google): Do not remove until https://github.com/flutter/flutter/issues/124346
// is complete, as this removal will cascade into `integration_test`
Duration
?
timeout
,
});
...
...
@@ -1430,6 +1432,8 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
'This parameter has no effect. Use the `timeout` parameter on `testWidgets` instead. '
'This feature was deprecated after v2.6.0-1.0.pre.'
)
// TODO(pdblasi-google): Do not remove until https://github.com/flutter/flutter/issues/124346
// is complete, as this removal will cascade into `integration_test`
Duration
?
timeout
,
})
{
assert
(!
inTest
);
...
...
@@ -1927,6 +1931,8 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
'This parameter has no effect. Use the `timeout` parameter on `testWidgets` instead. '
'This feature was deprecated after v2.6.0-1.0.pre.'
)
// TODO(pdblasi-google): Do not remove until https://github.com/flutter/flutter/issues/124346
// is complete, as this removal will cascade into `integration_test`
Duration
?
timeout
,
})
{
assert
(!
inTest
);
...
...
packages/flutter_test/test_fixes/.dartignore
0 → 100644
View file @
6839b3cb
packages/flutter_test/test_fixes/analysis_options.yaml
0 → 100644
View file @
6839b3cb
# This ensures that parent analysis options do not accidentally break the fix tests.
packages/flutter_test/test_fixes/flutter_test/animation_sheet_builder.dart
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
testWidgets
(
'test'
,
(
WidgetTester
tester
)
async
{
final
AnimationSheetBuilder
animationSheet
=
AnimationSheetBuilder
(
frameSize:
const
Size
(
48
,
24
));
// This line will remain unchanged as there is no replacement for the
// `sheetSize` API.
tester
.
binding
.
setSurfaceSize
(
animationSheet
.
sheetSize
());
// These lines will replace the calls to `display` with a call to `collate`
// but will still have a build error.
// Changes made in https://github.com/flutter/flutter/pull/83337
final
Widget
display
=
await
animationSheet
.
display
();
final
Widget
display2
=
await
animationSheet
.
display
(
key:
UniqueKey
());
});
}
packages/flutter_test/test_fixes/flutter_test/animation_sheet_builder.dart.expect
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('test', (WidgetTester tester) async {
final AnimationSheetBuilder animationSheet =
AnimationSheetBuilder(frameSize: const Size(48, 24));
// This line will remain unchanged as there is no replacement for the
// `sheetSize` API.
tester.binding.setSurfaceSize(animationSheet.sheetSize());
// These lines will replace the calls to `display` with a call to `collate`
// but will still have a build error.
// Changes made in https://github.com/flutter/flutter/pull/83337
final Widget display = await animationSheet.collate(1);
final Widget display2 = await animationSheet.collate(1);
});
}
packages/flutter_test/test_fixes/flutter_test/binding/automated_test_widgets_flutter_binding.dart
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
final
binding
=
AutomatedTestWidgetsFlutterBinding
.
ensureInitialized
();
binding
.
runTest
(
()
async
{
},
()
{
},
// Changes made in https://github.com/flutter/flutter/pull/89952
timeout:
Duration
(
minutes:
30
),
);
}
packages/flutter_test/test_fixes/flutter_test/binding/automated_test_widgets_flutter_binding.dart.expect
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
void main() {
final binding = AutomatedTestWidgetsFlutterBinding.ensureInitialized();
binding.runTest(
() async { },
() { },
);
}
packages/flutter_test/test_fixes/flutter_test/binding/live_test_widgets_flutter_binding.dart
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
final
binding
=
LiveTestWidgetsFlutterBinding
.
ensureInitialized
();
binding
.
runTest
(
()
async
{
},
()
{
},
// Changes made in https://github.com/flutter/flutter/pull/89952
timeout:
Duration
(
minutes:
30
),
);
}
packages/flutter_test/test_fixes/flutter_test/binding/live_test_widgets_flutter_binding.dart.expect
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
void main() {
final binding = LiveTestWidgetsFlutterBinding.ensureInitialized();
binding.runTest(
() async { },
() { },
);
}
packages/flutter_test/test_fixes/flutter_test/binding/test_widgets_flutter_binding.dart
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:ui'
;
import
'package:clock/src/clock.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
async
{
TestWidgetsFlutterBinding
binding
=
AutomatedTestWidgetsFlutterBinding
.
ensureInitialized
();
binding
.
runTest
(
()
async
{
// This will be unchanged as there is no equivalent API.
binding
.
addTime
(
Duration
(
seconds:
30
));
await
binding
.
runAsync
(
()
async
{},
// Changes made in https://github.com/flutter/flutter/pull/89952
additionalTime:
Duration
(
seconds:
25
),
);
},
()
{
},
// This timeout will be removed and not replaced since there is no
// equivalent API at this layer.
timeout:
Duration
(
minutes:
30
),
);
}
packages/flutter_test/test_fixes/flutter_test/binding/test_widgets_flutter_binding.dart.expect
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
void main() async {
TestWidgetsFlutterBinding binding = AutomatedTestWidgetsFlutterBinding.ensureInitialized();
binding.runTest(
() async {
// This will be unchanged as there is no equivalent API.
binding.addTime(Duration(seconds: 30));
await binding.runAsync(
() async {},
);
},
() { },
);
}
packages/flutter_test/test_fixes/flutter_test/widget_tester.dart
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
testWidgets
(
'test'
,
(
WidgetTester
tester
)
async
{
// This call will be unchanged
// Changes made in https://github.com/flutter/flutter/pull/89952
},
timeout:
Timeout
(
Duration
(
hours:
1
)));
testWidgets
(
'test'
,
(
WidgetTester
tester
)
async
{
// The `timeout` will remain unchanged, but `initialTimeout` will be removed
// Changes made in https://github.com/flutter/flutter/pull/89952
},
timeout:
Timeout
(
Duration
(
minutes:
45
)),
initialTimeout:
Duration
(
minutes:
30
));
testWidgets
(
'test'
,
(
WidgetTester
tester
)
async
{
// initialTimeout will be wrapped in a Timeout and changed to `timeout`
// Changes made in https://github.com/flutter/flutter/pull/89952
},
initialTimeout:
Duration
(
seconds:
30
));
}
packages/flutter_test/test_fixes/flutter_test/widget_tester.dart.expect
0 → 100644
View file @
6839b3cb
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('test', (WidgetTester tester) async {
// This call will be unchanged
// Changes made in https://github.com/flutter/flutter/pull/89952
}, timeout: Timeout(Duration(hours: 1)));
testWidgets('test', (WidgetTester tester) async {
// The `timeout` will remain unchanged, but `initialTimeout` will be removed
// Changes made in https://github.com/flutter/flutter/pull/89952
},
timeout: Timeout(Duration(minutes: 45)));
testWidgets('test', (WidgetTester tester) async {
// initialTimeout will be wrapped in a Timeout and changed to `timeout`
// Changes made in https://github.com/flutter/flutter/pull/89952
}, timeout: Timeout(Duration(seconds: 30)));
}
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