diff options
author | cyBerta <cyberta@riseup.net> | 2023-11-22 10:41:39 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-11-23 09:51:28 +0100 |
commit | e2eccdcf5c49daf9236f782dcdf8ba9924cf7147 (patch) | |
tree | 16c7c6f34655867d29e26d6a285d8f729b4809dd /app/src/androidTestCustom/java/se/leap/bitmaskclient/base | |
parent | 85e5ed816451b6e78574a40980f6b30876836e4d (diff) |
improve screenhsot tests, fix them for custom flavored builds
Diffstat (limited to 'app/src/androidTestCustom/java/se/leap/bitmaskclient/base')
-rw-r--r-- | app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java b/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java deleted file mode 100644 index 15e6f799..00000000 --- a/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package se.leap.bitmaskclient.base; - -import static androidx.test.core.app.ApplicationProvider.getApplicationContext; -import static androidx.test.espresso.Espresso.onView; -import static androidx.test.espresso.action.ViewActions.click; -import static androidx.test.espresso.assertion.ViewAssertions.matches; -import static androidx.test.espresso.matcher.RootMatchers.isDialog; -import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; -import static androidx.test.espresso.matcher.ViewMatchers.withId; -import static androidx.test.espresso.matcher.ViewMatchers.withText; -import static utils.CustomInteractions.tryResolve; - -import android.net.VpnService; - -import androidx.test.espresso.ViewInteraction; -import androidx.test.uiautomator.UiObject; -import androidx.test.uiautomator.UiObjectNotFoundException; -import androidx.test.uiautomator.UiSelector; - -import org.junit.Test; - -import se.leap.bitmaskclient.R; -import tools.fastlane.screengrab.Screengrab; - -public class CustomProviderTest { - - /*@Test - @Override - public void test01_vpnStartTest() throws InterruptedException, UiObjectNotFoundException { - // handle VPN permission dialog - if (VpnService.prepare(getApplicationContext()) != null) { - UiObject okButton = device.findObject(new UiSelector().packageName("com.android.vpndialogs").resourceId("android:id/button1")); - okButton.waitForExists(30000); - okButton.click(); - } - - ViewInteraction mainButtonStop; - mainButtonStop = tryResolve( - onView(withId(R.id.main_button)), - matches(isDisplayed()), - 30); - Screengrab.screenshot("VPN_connected"); - - mainButtonStop.perform(click()); - Screengrab.screenshot("VPN_ask_disconnect"); - - ViewInteraction alertDialogOKbutton = tryResolve(onView(withText(android.R.string.yes)) - .inRoot(isDialog()), - matches(isDisplayed())); - alertDialogOKbutton.perform(click()); - Screengrab.screenshot("VPN_disconnected"); - - mainButtonStop.perform(click()); - Thread.sleep(50); - Screengrab.screenshot("VPN_connecting"); - } - - @Override - public boolean configureProviderIfNeeded() { - return false; - }*/ -}
\ No newline at end of file |