|
@@ -1,6 +1,5 @@
|
|
|
package com.owncloud.android;
|
|
|
|
|
|
-import android.Manifest;
|
|
|
import android.accounts.Account;
|
|
|
import android.accounts.AccountManager;
|
|
|
import android.accounts.AuthenticatorException;
|
|
@@ -14,6 +13,7 @@ import android.view.View;
|
|
|
|
|
|
import com.facebook.testing.screenshot.Screenshot;
|
|
|
import com.facebook.testing.screenshot.internal.TestNameDetector;
|
|
|
+import com.nextcloud.client.GrantStoragePermissionRule;
|
|
|
import com.nextcloud.client.account.User;
|
|
|
import com.nextcloud.client.account.UserAccountManager;
|
|
|
import com.nextcloud.client.account.UserAccountManagerImpl;
|
|
@@ -45,6 +45,7 @@ import org.apache.commons.io.FileUtils;
|
|
|
import org.junit.Before;
|
|
|
import org.junit.BeforeClass;
|
|
|
import org.junit.Rule;
|
|
|
+import org.junit.rules.TestRule;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.FileWriter;
|
|
@@ -58,7 +59,6 @@ import androidx.fragment.app.DialogFragment;
|
|
|
import androidx.test.espresso.contrib.DrawerActions;
|
|
|
import androidx.test.espresso.intent.rule.IntentsTestRule;
|
|
|
import androidx.test.platform.app.InstrumentationRegistry;
|
|
|
-import androidx.test.rule.GrantPermissionRule;
|
|
|
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry;
|
|
|
import androidx.test.runner.lifecycle.Stage;
|
|
|
|
|
@@ -75,8 +75,7 @@ import static org.junit.Assert.assertTrue;
|
|
|
|
|
|
public abstract class AbstractIT {
|
|
|
@Rule
|
|
|
- public final GrantPermissionRule permissionRule = GrantPermissionRule.grant(
|
|
|
- Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
|
|
+ public final TestRule permissionRule = GrantStoragePermissionRule.grant();
|
|
|
|
|
|
protected static OwnCloudClient client;
|
|
|
protected static Account account;
|