Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
Tobias Kaminsky 2023-10-17 02:31:26 +02:00
commit c778d0b639
11 changed files with 32 additions and 31 deletions

View file

@ -314,7 +314,7 @@ public abstract class AbstractIT {
return currentActivity;
}
protected void shortSleep() {
protected static void shortSleep() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {

View file

@ -135,10 +135,20 @@ public abstract class AbstractOnServerIT extends AbstractIT {
.isSuccess());
}
assertTrue(new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess()
);
boolean removeResult = false;
for (int i = 0; i < 5; i++) {
removeResult = new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess();
if (removeResult) {
break;
}
shortSleep();
}
assertTrue(removeResult);
}
}
}

View file

@ -41,7 +41,6 @@ import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -106,29 +105,6 @@ public class UploadIT extends AbstractOnServerIT {
createDummyFiles();
}
@After
public void after() {
RemoteOperationResult result = new RefreshFolderOperation(getStorageManager().getFileByPath("/"),
System.currentTimeMillis() / 1000L,
false,
true,
getStorageManager(),
user,
targetContext)
.execute(client);
// cleanup only if folder exists
if (result.isSuccess() && getStorageManager().getFileByDecryptedRemotePath(FOLDER) != null) {
new RemoveFileOperation(getStorageManager().getFileByDecryptedRemotePath(FOLDER),
false,
user,
false,
targetContext,
getStorageManager())
.execute(client);
}
}
@Test
public void testEmptyUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
@ -529,8 +505,8 @@ public class UploadIT extends AbstractOnServerIT {
assertNotNull(ocFile);
assertEquals(remotePath, ocFile.getRemotePath());
assertEquals(new ImageDimension(451f, 529f), ocFile.getImageDimension());
assertEquals(new GeoLocation(49.99679166666667, 8.67198611111111), ocFile.getGeoLocation());
assertEquals(new ImageDimension(300f, 200f), ocFile.getImageDimension());
assertEquals(new GeoLocation(64, -46), ocFile.getGeoLocation());
}
private void verifyStoragePath(OCFile file) {

View file

@ -20,6 +20,7 @@
*/
package com.owncloud.android.ui
import android.os.Build
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso
import androidx.test.espresso.action.ViewActions
@ -28,6 +29,7 @@ import androidx.test.espresso.web.sugar.Web
import androidx.test.espresso.web.webdriver.DriverAtoms
import androidx.test.espresso.web.webdriver.Locator
import androidx.test.filters.LargeTest
import androidx.test.filters.SdkSuppress
import androidx.test.platform.app.InstrumentationRegistry
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.account.UserAccountManagerImpl
@ -59,6 +61,12 @@ class LoginIT : AbstractIT() {
@Test
@Throws(InterruptedException::class)
@Suppress("MagicNumber", "SwallowedException")
/**
* The CI/CD pipeline is encountering issues related to the Android version for this functionality.
* Therefore the test will only be executed on Android versions 10 and above.
*/
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
fun login() {
val arguments = InstrumentationRegistry.getArguments()
val baseUrl = arguments.getString("TEST_SERVER_URL")!!

View file

@ -843,6 +843,7 @@
<string name="trashbin_empty_message">ستتمكن من استعادة الملفات المحذوفة من هنا.</string>
<string name="trashbin_file_not_deleted">الملف %1$s لا يمكن حذفه!</string>
<string name="trashbin_file_not_restored">الملف %1$s لا يمكن إسترجاعه!</string>
<string name="trashbin_file_remove">حذف نهائي</string>
<string name="trashbin_loading_failed">فشل تحميل سلة المحذوفات</string>
<string name="trashbin_not_emptied">تعذر حذف الملفات نهائياً!</string>
<string name="unlock_file">فتح قفل الملف</string>

View file

@ -836,6 +836,7 @@
<string name="trashbin_empty_message">You will be able to recover deleted files from here.</string>
<string name="trashbin_file_not_deleted">File %1$s could not be deleted!</string>
<string name="trashbin_file_not_restored">File %1$s could not be restored!</string>
<string name="trashbin_file_remove">Delete permanently</string>
<string name="trashbin_loading_failed">Loading trash bin failed!</string>
<string name="trashbin_not_emptied">Files could not be deleted permanently!</string>
<string name="unlock_file">Unlock file</string>

View file

@ -807,6 +807,7 @@
<string name="trashbin_empty_message">Ще можете да възстановите изтритите файлове от тук.</string>
<string name="trashbin_file_not_deleted">Файлът %1$s не може да бъде изтрит!</string>
<string name="trashbin_file_not_restored">Файлът %1$s не може да бъде възстановен!</string>
<string name="trashbin_file_remove">Изтрий завинаги</string>
<string name="trashbin_loading_failed">Зареждането на кошчето е неуспешно!</string>
<string name="trashbin_not_emptied">Файловете не могат да бъдат окончателно изтрити!</string>
<string name="unlock_file">Отключване на файл</string>

View file

@ -666,6 +666,7 @@
<string name="trashbin_empty_message">Posupl eo deoc\'h adtapout ar restroù lamet adalek al lec\'h mañ</string>
<string name="trashbin_file_not_deleted">Ar restr %1$s n\'eo ket evit bezhaãn lamet !</string>
<string name="trashbin_file_not_restored">Ar restr %1$s n\'eo ket evit bezha adlakaet !</string>
<string name="trashbin_file_remove">Lamet da viken</string>
<string name="trashbin_not_emptied">N\'eo ket posupl lemel ar restr da virviken !</string>
<string name="unlock_file">Dibrennan ar restr</string>
<string name="unread_comments">Bez eez eus kemenadennom n\'int ket bet lennet</string>

View file

@ -796,6 +796,7 @@
<string name="trashbin_empty_message">Des d\'aquí es podran recuperar fitxers suprimits.</string>
<string name="trashbin_file_not_deleted">El fitxer %1$s no es pot suprimir!</string>
<string name="trashbin_file_not_restored">El fitxer %1$s no es pot restaurar!</string>
<string name="trashbin_file_remove">Suprimeix permanentment</string>
<string name="trashbin_loading_failed">No s\'ha pogut carregar la paperera!</string>
<string name="trashbin_not_emptied">Els fitxers no s\'han pogut suprimir permanentment!</string>
<string name="unlock_file">Desbloca el fitxer</string>

View file

@ -819,6 +819,7 @@ Enheds legitimationsoplysninger er sat op
<string name="trashbin_empty_message">Du vil kunne gendanne slettede filer herfra.</string>
<string name="trashbin_file_not_deleted">Fil %1$s kunne ikke slettes!</string>
<string name="trashbin_file_not_restored">Fil %1$s kunne ikke genskabes!</string>
<string name="trashbin_file_remove">Slet permanent</string>
<string name="trashbin_loading_failed">Indlæsning af papirkurv mislykkedes!</string>
<string name="trashbin_not_emptied">Filer kunne ikke permanent slettes!</string>
<string name="unlock_file">Lås op filen</string>

View file

@ -811,6 +811,7 @@
<string name="trashbin_empty_message">Μπορείτε να ανακτήσετε διαγραμμένα αρχεία από εδώ.</string>
<string name="trashbin_file_not_deleted">Το αρχείο %1$s δεν μπορεί να διαγραφεί!</string>
<string name="trashbin_file_not_restored">Το αρχείο %1$s δεν μπορεί να ανακτηθεί!</string>
<string name="trashbin_file_remove">Διαγραφή οριστικά</string>
<string name="trashbin_loading_failed">Αποτυχία φόρτωσης κάδου ανακύκλωσης!</string>
<string name="trashbin_not_emptied">Τα αρχεία δεν θα διαγραφούν μόνιμα!</string>
<string name="unlock_file">Ξεκλείδωμα αρχείου</string>