From 98f2fcedc3c645b38ecf168d57e28287c4a7a76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 10 Jul 2014 18:32:55 +0200 Subject: Simulate network down. The tests say they failed, but it's because the adb server is no longer able to communicate with the emulator due to switching network connectivity off (and being the adb server connected to a local tcp port of the emulator, this port dissapears once connectivity is down). To see if all tests passed, take a look at the logcat. Once tests are finished, issue "adb kill-server" from the development machine, and then "adb logcat". --- .../androidTest/java/se/leap/bitmaskclient/test/testDashboard.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/src/androidTest/java/se/leap') diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java index 85197493..66ef6565 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java @@ -48,14 +48,13 @@ public class testDashboard extends ActivityInstrumentationTestCase2 { if(!solo.waitForText(getActivity().getString(R.string.eip_state_not_connected))) fail(); - /*ConnectionManager.setMobileDataEnabled(false, solo.getCurrentActivity().getApplicationContext()); + ConnectionManager.setMobileDataEnabled(false, solo.getCurrentActivity().getApplicationContext()); solo.clickOnView(solo.getView(R.id.eipSwitch)); - if(!solo.waitForText(getActivity().getString(R.string.eip_status_start_pending))) - fail(); + // if(!solo.waitForText(getActivity().getString(R.string.eip_status_start_pending))) + // fail(); if(!solo.waitForText(getActivity().getString(R.string.state_nonetwork))) fail(); - */ } public void testLogInAndOut() { -- cgit v1.2.3