Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit d0ac51a

Browse files
authored
[e2e] Version bump for v0.5.0 (#2807)
* Version bump for v0.5.0
1 parent fc6bd98 commit d0ac51a

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

packages/e2e/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.5.0
2+
3+
* **Breaking change** by default, tests will use the device window size.
4+
Tests can still override the window size by using the `setSurfaceSize` method.
5+
* **Breaking change** If using Flutter 1.19.0-2.0.pre.196 or greater, the
6+
`testTextInput` will no longer automatically register.
7+
* **Breaking change** If using Flutter 1.19.0-2.0.pre.196 or greater, the
8+
`HttpOverrides` will no longer be set by default.
9+
* Minor formatting changes to Dart code.
10+
111
## 0.4.3+3
212

313
* Fixed code snippet in readme that referenced a non-existent `result` variable.

packages/e2e/lib/e2e.dart

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ class E2EWidgetsFlutterBinding extends LiveTestWidgetsFlutterBinding {
2626
// `plugins.flutter.io/e2e`. Mark the tests as complete before invoking
2727
// the channel.
2828
if (kIsWeb) {
29-
if (!_allTestsPassed.isCompleted) _allTestsPassed.complete(true);
29+
if (!_allTestsPassed.isCompleted) {
30+
_allTestsPassed.complete(true);
31+
}
3032
}
3133
await _channel.invokeMethod<void>(
32-
'allTestsFinished', <String, dynamic>{'results': _results});
34+
'allTestsFinished',
35+
<String, dynamic>{'results': _results},
36+
);
3337
} on MissingPluginException {
3438
print('Warning: E2E test plugin was not detected.');
3539
}
@@ -110,20 +114,30 @@ class E2EWidgetsFlutterBinding extends LiveTestWidgetsFlutterBinding {
110114
}
111115

112116
@override
113-
Future<void> runTest(Future<void> testBody(), VoidCallback invariantTester,
114-
{String description = '', Duration timeout}) async {
117+
Future<void> runTest(
118+
Future<void> testBody(),
119+
VoidCallback invariantTester, {
120+
String description = '',
121+
Duration timeout,
122+
}) async {
115123
// TODO(jackson): Report the results individually instead of all at once
116124
// See https://github.com/flutter/flutter/issues/38985
117-
final TestExceptionReporter valueBeforeTest = reportTestException;
125+
final TestExceptionReporter oldTestExceptionReporter = reportTestException;
118126
reportTestException =
119127
(FlutterErrorDetails details, String testDescription) {
120128
_results[description] = 'failed';
121129
_failureMethodsDetails.add(Failure(testDescription, details.toString()));
122-
if (!_allTestsPassed.isCompleted) _allTestsPassed.complete(false);
123-
valueBeforeTest(details, testDescription);
130+
if (!_allTestsPassed.isCompleted) {
131+
_allTestsPassed.complete(false);
132+
}
133+
oldTestExceptionReporter(details, testDescription);
124134
};
125-
await super.runTest(testBody, invariantTester,
126-
description: description, timeout: timeout);
135+
await super.runTest(
136+
testBody,
137+
invariantTester,
138+
description: description,
139+
timeout: timeout,
140+
);
127141
_results[description] ??= 'success';
128142
}
129143
}

packages/e2e/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: e2e
22
description: Runs tests that use the flutter_test API as integration tests.
3-
version: 0.4.3+3
3+
version: 0.5.0
44
homepage: https://github.com/flutter/plugins/tree/master/packages/e2e
55

66
environment:

0 commit comments

Comments
 (0)