mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Adapt tests to do-not-kill lib as well
This commit is contained in:
@@ -39,11 +39,11 @@ import static androidx.test.espresso.matcher.ViewMatchers.withId;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withText;
|
||||
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
|
||||
import static java.lang.Thread.sleep;
|
||||
import static org.briarproject.android.dontkillmelib.DozeUtils.needsDozeWhitelisting;
|
||||
import static org.briarproject.bramble.api.plugin.LanTcpConstants.ID;
|
||||
import static org.briarproject.briar.android.OverlayTapViewAction.visualClick;
|
||||
import static org.briarproject.briar.android.ViewActions.waitFor;
|
||||
import static org.briarproject.briar.android.ViewActions.waitUntilMatches;
|
||||
import static org.briarproject.briar.android.util.UiUtils.needsDozeWhitelisting;
|
||||
import static org.hamcrest.CoreMatchers.allOf;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import static androidx.test.espresso.matcher.ViewMatchers.isEnabled;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withId;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withText;
|
||||
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
|
||||
import static org.briarproject.android.dontkillmelib.DozeUtils.needsDozeWhitelisting;
|
||||
import static org.briarproject.bramble.api.plugin.LanTcpConstants.ID;
|
||||
import static org.briarproject.briar.android.ViewActions.waitUntilMatches;
|
||||
import static org.briarproject.briar.android.util.UiUtils.needsDozeWhitelisting;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.briarproject.briar.android.account;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import org.briarproject.android.dontkillmelib.DozeHelper;
|
||||
import org.briarproject.bramble.api.account.AccountManager;
|
||||
import org.briarproject.bramble.api.crypto.PasswordStrengthEstimator;
|
||||
import org.briarproject.bramble.test.BrambleMockTestCase;
|
||||
@@ -48,7 +49,7 @@ public class SetupViewModelTest extends BrambleMockTestCase {
|
||||
context.checking(new Expectations() {{
|
||||
oneOf(accountManager).accountExists();
|
||||
will(returnValue(false));
|
||||
allowing(dozeHelper).needToShowDozeFragment(app);
|
||||
allowing(dozeHelper).needToShowDoNotKillMeFragment(app);
|
||||
allowing(app).getApplicationContext();
|
||||
will(returnValue(appContext));
|
||||
allowing(appContext).getPackageManager();
|
||||
|
||||
Reference in New Issue
Block a user