fix test on non google emulator (only with google api)

add groupfolder capability

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2023-06-07 15:53:28 +02:00
parent 2aecc3b92f
commit 3df7900596
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
2 changed files with 8 additions and 7 deletions

View file

@ -14,7 +14,6 @@ import android.view.View;
import com.facebook.testing.screenshot.Screenshot;
import com.facebook.testing.screenshot.internal.TestNameDetector;
import com.nextcloud.test.GrantStoragePermissionRule;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
@ -26,6 +25,7 @@ import com.nextcloud.client.preferences.AppPreferencesImpl;
import com.nextcloud.client.preferences.DarkMode;
import com.nextcloud.common.NextcloudClient;
import com.nextcloud.java.util.Optional;
import com.nextcloud.test.GrantStoragePermissionRule;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.UploadsStorageManager;
@ -36,6 +36,7 @@ import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.UploadFileOperation;
@ -168,11 +169,14 @@ public abstract class AbstractIT {
break;
}
OCCapability capability = fileDataStorageManager.getCapability(account.name);
capability.setGroupfolders(CapabilityBooleanType.TRUE);
if (colorHex != null) {
OCCapability capability = fileDataStorageManager.getCapability(account.name);
capability.setServerColor(colorHex);
fileDataStorageManager.saveCapabilities(capability);
}
fileDataStorageManager.saveCapabilities(capability);
}
// dark / light

View file

@ -23,11 +23,9 @@ package com.nextcloud.android.appReview
import androidx.appcompat.app.AppCompatActivity
import com.google.android.gms.tasks.Task
import com.google.android.play.core.review.ReviewException
import com.google.android.play.core.review.ReviewInfo
import com.google.android.play.core.review.ReviewManager
import com.google.android.play.core.review.ReviewManagerFactory
import com.google.android.play.core.review.model.ReviewErrorCode
import com.nextcloud.appReview.AppReviewShownModel
import com.nextcloud.appReview.InAppReviewHelper
import com.nextcloud.client.preferences.AppPreferences
@ -96,8 +94,7 @@ class InAppReviewHelperImpl(val appPreferences: AppPreferences) : InAppReviewHel
launchAppReviewFlow(manager, activity, reviewInfo)
} else {
// There was some problem, log or handle the error code.
@ReviewErrorCode val reviewErrorCode = (task.exception as ReviewException).errorCode
Log_OC.e(TAG, "Failed to get ReviewInfo: $reviewErrorCode")
Log_OC.e(TAG, "Failed to get ReviewInfo: ${task.exception?.message}")
}
}
}