summaryrefslogtreecommitdiff
path: root/app/src/androidTestNormal/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTestNormal/java/se')
-rw-r--r--app/src/androidTestNormal/java/se/leap/bitmaskclient/base/BitmaskTest.java42
-rw-r--r--app/src/androidTestNormal/java/se/leap/bitmaskclient/base/ProviderSetupTest.java69
-rw-r--r--app/src/androidTestNormal/java/se/leap/bitmaskclient/suite/ScreenshotTest.java19
3 files changed, 0 insertions, 130 deletions
diff --git a/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/BitmaskTest.java b/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/BitmaskTest.java
deleted file mode 100644
index aa437c74..00000000
--- a/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/BitmaskTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package se.leap.bitmaskclient.base;
-
-
-import static androidx.test.espresso.Espresso.onData;
-import static androidx.test.espresso.action.ViewActions.click;
-import static androidx.test.espresso.matcher.ViewMatchers.withId;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.hasToString;
-import static utils.CustomInteractions.tryResolve;
-
-import androidx.test.espresso.DataInteraction;
-import androidx.test.espresso.NoMatchingViewException;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.LargeTest;
-
-import org.junit.FixMethodOrder;
-import org.junit.runner.RunWith;
-import org.junit.runners.MethodSorters;
-
-import se.leap.bitmaskclient.R;
-
-@LargeTest
-@RunWith(AndroidJUnit4.class)
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class BitmaskTest extends ProviderBaseTest {
-
- @Override
- public boolean configureProviderIfNeeded() {
- try {
- DataInteraction linearLayout = tryResolve(onData(hasToString(containsString("riseup.net")))
- .inAdapterView(withId(R.id.provider_list)),
- 2);
- linearLayout.perform(click());
- return true;
- } catch (NoMatchingViewException e) {
- // it might be that the provider was already configured, so we print the stack
- // trace here and try to continue
- e.printStackTrace();
- }
- return false;
- }
-}
diff --git a/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/ProviderSetupTest.java b/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/ProviderSetupTest.java
deleted file mode 100644
index 460a30ad..00000000
--- a/app/src/androidTestNormal/java/se/leap/bitmaskclient/base/ProviderSetupTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package se.leap.bitmaskclient.base;
-
-
-import static android.content.Context.MODE_PRIVATE;
-import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
-import static androidx.test.espresso.Espresso.onData;
-import static androidx.test.espresso.action.ViewActions.click;
-import static androidx.test.espresso.matcher.ViewMatchers.withId;
-import static org.hamcrest.Matchers.anything;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.hasToString;
-import static se.leap.bitmaskclient.base.models.Constants.SHARED_PREFERENCES;
-import static utils.CustomInteractions.tryResolve;
-
-import android.content.SharedPreferences;
-
-import androidx.test.espresso.DataInteraction;
-import androidx.test.espresso.NoMatchingViewException;
-import androidx.test.ext.junit.rules.ActivityScenarioRule;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.LargeTest;
-
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import se.leap.bitmaskclient.R;
-import se.leap.bitmaskclient.base.utils.PreferenceHelper;
-import se.leap.bitmaskclient.providersetup.ProviderListActivity;
-import tools.fastlane.screengrab.Screengrab;
-import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
-import tools.fastlane.screengrab.locale.LocaleTestRule;
-
-@LargeTest
-@RunWith(AndroidJUnit4.class)
-public class ProviderSetupTest {
-
- @ClassRule
- public static final LocaleTestRule localeTestRule = new LocaleTestRule();
-
- @Rule
- public ActivityScenarioRule<ProviderListActivity> mActivityScenarioRule =
- new ActivityScenarioRule<>(ProviderListActivity.class);
-
- @Before
- public void setup() {
- Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
- SharedPreferences preferences = PreferenceHelper.getSharedPreferences(getApplicationContext());
- preferences.edit().clear().commit();
- }
-
- @Test
- public void testConfigureRiseupVPNScreenshot() {
- DataInteraction linearLayout = tryResolve(onData(hasToString(containsString("riseup.net")))
- .inAdapterView(withId(R.id.provider_list)),
- 2);
- Screengrab.screenshot("ProviderListActivity");
- linearLayout.perform(click());
- Screengrab.screenshot("ProviderListActivity_configureRiseup");
- }
-
- @Test
- public void testaddManuallyNewProviderScreenshot() {
- onData(anything()).inAdapterView(withId(R.id.provider_list)).atPosition(3).perform(click());
- Screengrab.screenshot("ProviderListActivity_addManuallyNewProvider");
- }
-}
diff --git a/app/src/androidTestNormal/java/se/leap/bitmaskclient/suite/ScreenshotTest.java b/app/src/androidTestNormal/java/se/leap/bitmaskclient/suite/ScreenshotTest.java
deleted file mode 100644
index 5fa45a95..00000000
--- a/app/src/androidTestNormal/java/se/leap/bitmaskclient/suite/ScreenshotTest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package se.leap.bitmaskclient.suite;
-
-
-import androidx.test.filters.LargeTest;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-import se.leap.bitmaskclient.base.ProviderSetupTest;
-import se.leap.bitmaskclient.base.BitmaskTest;
-
-@LargeTest
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ProviderSetupTest.class,
- BitmaskTest.class,
-})
-public class ScreenshotTest {
-}