@@ -55,16 +55,7 @@ void main() {
5555 expect (result, ParseConnectivityResult .wifi);
5656 });
5757
58- test (
59- 'ethernet connection returns ParseConnectivityResult.ethernet' ,
60- () async {
61- mockPlatform.setConnectivity ([ConnectivityResult .ethernet]);
62-
63- final result = await Parse ().checkConnectivity ();
64-
65- expect (result, ParseConnectivityResult .ethernet);
66- },
67- );
58+
6859
6960 test ('mobile connection returns ParseConnectivityResult.mobile' , () async {
7061 mockPlatform.setConnectivity ([ConnectivityResult .mobile]);
@@ -93,16 +84,7 @@ void main() {
9384 expect (result, ParseConnectivityResult .wifi);
9485 });
9586
96- test ('ethernet takes priority over mobile (issue #1042 fix)' , () async {
97- mockPlatform.setConnectivity ([
98- ConnectivityResult .ethernet,
99- ConnectivityResult .mobile,
100- ]);
101-
102- final result = await Parse ().checkConnectivity ();
103-
104- expect (result, ParseConnectivityResult .ethernet);
105- });
87+
10688
10789 test ('unsupported connection types fall back to none' , () async {
10890 mockPlatform.setConnectivity ([ConnectivityResult .bluetooth]);
@@ -141,21 +123,6 @@ void main() {
141123 await subscription.cancel ();
142124 });
143125
144- test ('ethernet event emits ParseConnectivityResult.ethernet' , () async {
145- final completer = Completer <ParseConnectivityResult >();
146- final subscription = Parse ().connectivityStream.listen ((result) {
147- if (! completer.isCompleted) {
148- completer.complete (result);
149- }
150- });
151-
152- mockPlatform.setConnectivity ([ConnectivityResult .ethernet]);
153-
154- final result = await completer.future;
155- expect (result, ParseConnectivityResult .ethernet);
156-
157- await subscription.cancel ();
158- });
159126
160127 test ('mobile event emits ParseConnectivityResult.mobile' , () async {
161128 final completer = Completer <ParseConnectivityResult >();
@@ -189,23 +156,6 @@ void main() {
189156 await subscription.cancel ();
190157 });
191158
192- test ('stream respects priority: ethernet over mobile' , () async {
193- final completer = Completer <ParseConnectivityResult >();
194- final subscription = Parse ().connectivityStream.listen ((result) {
195- if (! completer.isCompleted) {
196- completer.complete (result);
197- }
198- });
199-
200- mockPlatform.setConnectivity ([
201- ConnectivityResult .ethernet,
202- ConnectivityResult .mobile,
203- ]);
204-
205- final result = await completer.future;
206- expect (result, ParseConnectivityResult .ethernet);
207-
208- await subscription.cancel ();
209- });
159+
210160 });
211161}
0 commit comments