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

[connectivity]Added integration test. #1455

Merged
merged 4 commits into from
Apr 6, 2019

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Apr 5, 2019

Add test driver to the plugin.

_connectivity = Connectivity();
});

test('test _checkConnectivity', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove test and underscore

expect(result, isNotNull);
});

test('test connectivity result', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably combine this test with the one above.

enableFlutterDriverExtension(handler: (_) => completer.future);
tearDownAll(() => completer.complete(null));

group('Connectivity test driver', () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere in the plugins repo we use the stringified class name '$Connectivity' to identify group so you may want to be consistent with that, though it's not required. I wouldn't say "test driver" though.

@@ -1,3 +1,7 @@
## 0.4.2+2

* Add test driver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say "Added integration test." Although we're using Flutter driver to launch the test, we don't use the FlutterDriver API to do anything, so it may be confusing otherwise.

@collinjackson
Copy link
Contributor

lgtm modulo the nits above

@cyanglaz cyanglaz changed the title [connectivity]add test driver. [connectivity]Added integration test. Apr 5, 2019
@collinjackson
Copy link
Contributor

looks ready to merge

@collinjackson collinjackson added the submit queue The Flutter team is in the process of landing this PR. label Apr 6, 2019
@cyanglaz cyanglaz merged commit 4d92433 into flutter:master Apr 6, 2019
@cyanglaz cyanglaz deleted the connectivity_driver_test branch April 6, 2019 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes submit queue The Flutter team is in the process of landing this PR.
Projects
None yet
3 participants