Compare commits

...
Author SHA1 Message Date
Tobias Kaminsky 60295480b5 daily dev 20200215
020e5a2c3 Merge remote-tracking branch 'origin/master' into dev
490b292ad Merge pull request #5300 from nextcloud/sharedSearchAgain
61027524f test
af93382c6 test
68f06ea15 [tx-robot] updated from transifex
2d82f80e9 daily dev 20200214
2020-02-15 03:37:26 +01:00
Tobias Kaminsky 020e5a2c3b Merge remote-tracking branch 'origin/master' into dev 2020-02-15 03:30:49 +01:00
Andy Scherzinger 490b292ad9 Merge pull request #5300 from nextcloud/sharedSearchAgain
Re-enable shared search and add ui test for list shares
2020-02-14 13:52:18 +01:00
tobiasKaminsky 61027524f7 test
Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-14 13:01:21 +01:00
tobiasKaminsky af93382c66 test
Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-14 08:46:08 +01:00
Nextcloud bot 68f06ea158 [tx-robot] updated from transifex 2020-02-14 03:28:53 +00:00
Tobias Kaminsky 2d82f80e9c daily dev 20200214
706ae93a3 Merge remote-tracking branch 'origin/master' into dev
045a7aa9e Merge pull request #5466 from nextcloud/squareIcon
eefeda930 Add square google icon
7156aaff2 [tx-robot] updated from transifex
57ce989a5 daily dev 20200213
2020-02-14 03:38:38 +01:00
Tobias Kaminsky 706ae93a32 Merge remote-tracking branch 'origin/master' into dev 2020-02-14 03:31:56 +01:00
Andy Scherzinger 045a7aa9e7 Merge pull request #5466 from nextcloud/squareIcon
Add square google icon
2020-02-13 16:34:18 +01:00
tobiasKaminsky 5cc0360855 upload preliminary step
Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-13 15:34:53 +01:00
tobiasKaminsky eefeda930c Add square google icon
Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-13 15:32:24 +01:00
Nextcloud bot 7156aaff2a [tx-robot] updated from transifex 2020-02-13 03:33:37 +00:00
tobiasKaminsky 26d7b9c692 Fix after rebase
Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-11 08:58:31 +01:00
tobiasKaminsky c2750aabda Add ui test for list shares
add test user to drone
switch back to master
use "waitForIdleSync" instead of sleep

Signed-off-by: tobiasKaminsky <[email protected]>
2020-02-11 08:57:09 +01:00
23 changed files with 183 additions and 29 deletions

No files matched your search

+15 -1
View File
@@ -102,7 +102,21 @@ steps:
services:
- name: server
image: nextcloudci/server:server-3
image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
commands:
- /usr/local/bin/initnc.sh
- su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
- su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
- su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
- su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
- su www-data -c "php /var/www/html/occ group:add users"
- su www-data -c "php /var/www/html/occ group:adduser users user1"
- su www-data -c "php /var/www/html/occ group:adduser users user2"
- su www-data -c "git clone -b master https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
- su www-data -c "php /var/www/html/occ app:enable activity"
- su www-data -c "git clone -b master https://github.com/nextcloud/text.git /var/www/html/apps/text/"
- su www-data -c "php /var/www/html/occ app:enable text"
- /usr/local/bin/run.sh
trigger:
branch:
+2 -2
View File
@@ -177,8 +177,8 @@ android {
versionDev {
applicationId "com.nextcloud.android.beta"
dimension "default"
versionCode 20200213
versionName "20200213"
versionCode 20200215
versionName "20200215"
}
qa {
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+1 -1
View File
@@ -1 +1 @@
387
386
+13 -3
View File
@@ -15,7 +15,7 @@ emulator -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-window -no
PID=$(echo $!)
## server
docker run --name=uiComparison nextcloudci/server 1>/dev/null &
docker run --name=uiComparison nextcloudci/server:server-17 1>/dev/null &
sleep 5
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' uiComparison)
@@ -28,9 +28,19 @@ fi
cp gradle.properties gradle.properties_
sed -i s"/server/$IP/" gradle.properties
scripts/wait_for_emulator.sh
scripts/wait_for_server.sh ${IP}
## update all screenshots
# setup test server
docker exec uiComparison /bin/sh -c "/usr/local/bin/initnc.sh"
docker exec uiComparison /bin/sh -c "su www-data -c \"OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1\""
docker exec uiComparison /bin/sh -c "su www-data -c \"OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2\""
docker exec uiComparison /bin/sh -c "su www-data -c \"OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3\""
docker exec uiComparison /bin/sh -c "su www-data -c \"php /var/www/html/occ user:setting user2 files quota 1G\""
docker exec uiComparison /bin/sh -c "su www-data -c \"php /var/www/html/occ group:add users\""
docker exec uiComparison /bin/sh -c "su www-data -c \"php /var/www/html/occ group:adduser users user1\""
docker exec uiComparison /bin/sh -c "su www-data -c \"php /var/www/html/occ group:adduser users user2\""
docker exec uiComparison /bin/sh -c "/usr/local/bin/run.sh"
## update/create all screenshots
./gradlew executeScreenshotTests -Precord
## update screenshots in a class
+37 -17
View File
@@ -1,5 +1,19 @@
#!/usr/bin/env bash
upload() {
cd $1
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER"
curl -u $GITHUB_USER:$GITHUB_PASSWORD -X POST https://api.github.com/repos/nextcloud/android/issues/$PR/comments \
-d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER \" }"
exit 1
}
#1: LOG_USERNAME
#2: LOG_PASSWORD
#3: DRONE_BUILD_NUMBER
@@ -13,6 +27,9 @@ ID=$3
USER=$1
PASS=$2
TYPE=$4
PR=$5
GITHUB_USER=$6
GITHUB_PASSWORD=$7
REMOTE_FOLDER=$ID-$TYPE
set -e
@@ -22,27 +39,30 @@ if [ $TYPE = "IT" ]; then
elif [ $TYPE = "Unit" ]; then
FOLDER=build/reports/tests/testGplayDebugUnitTest
else
FOLDER=build/reports/shot/verification/
FOLDER=build/reports/shot/verification
fi
if [ ! -e $FOLDER ]; then
if [ -e $FOLDER ]; then
upload $FOLDER
else
echo "$TYPE test failed, but no output was generated. Maybe a preliminary stage failed."
curl -u $6:$7 \
-X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments \
curl -u $GITHUB_USER:$GITHUB_PASSWORD \
-X POST https://api.github.com/repos/nextcloud/android/issues/$PR/comments \
-d "{ \"body\" : \"$TYPE test failed, but no output was generated. Maybe a preliminary stage failed. \" }"
exit 1
if [ -e build/reports/androidTests/connected/flavors/GPLAY ] ; then
TYPE="IT"
upload "build/reports/androidTests/connected/flavors/GPLAY"
fi
if [ -e build/reports/tests/testGplayDebugUnitTest ] ; then
TYPE="Unit"
upload "build/reports/tests/testGplayDebugUnitTest"
fi
if [ -e build/reports/shot/verification ] ; then
TYPE="Screenshot"
upload "build/reports/shot/verification"
fi
fi
cd $FOLDER
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER"
curl -u $6:$7 -X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments \
-d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER \" }"
exit 1
+1 -1
View File
@@ -8,7 +8,7 @@ until [[ $status = "false" ]]; do
if [[ "$status" =~ "false" || "$status" = "" ]]; then
let "counter += 1"
if [[ $counter -gt 2 ]]; then
if [[ $counter -gt 10 ]]; then
echo "Failed to wait for server"
exit 1
fi
@@ -28,8 +28,17 @@ import android.app.Activity;
import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.R;
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation;
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
import com.owncloud.android.lib.resources.files.SearchRemoteOperation;
import com.owncloud.android.lib.resources.shares.CreateShareRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.events.SearchEvent;
import org.greenrobot.eventbus.EventBus;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
@@ -40,6 +49,8 @@ import androidx.test.rule.GrantPermissionRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertTrue;
public class FileDisplayActivityIT extends AbstractIT {
@@ -69,6 +80,53 @@ public class FileDisplayActivityIT extends AbstractIT {
Screenshot.snapActivity(sut).record();
}
@Test
public void showShares() {
assertTrue(new ExistenceCheckRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess());
assertTrue(new CreateFolderRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess());
assertTrue(new CreateFolderRemoteOperation("/shareToGroup/", true).execute(client).isSuccess());
assertTrue(new CreateFolderRemoteOperation("/shareViaLink/", true).execute(client).isSuccess());
assertTrue(new CreateFolderRemoteOperation("/noShare/", true).execute(client).isSuccess());
// share folder to user "admin"
assertTrue(new CreateShareRemoteOperation("/shareToAdmin/",
ShareType.USER,
"admin",
false,
"",
OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER)
.execute(client).isSuccess());
// share folder via public link
assertTrue(new CreateShareRemoteOperation("/shareViaLink/",
ShareType.PUBLIC_LINK,
"",
true,
"",
OCShare.READ_PERMISSION_FLAG)
.execute(client).isSuccess());
// share folder to group
Assert.assertTrue(new CreateShareRemoteOperation("/shareToGroup/",
ShareType.GROUP,
"users",
false,
"",
OCShare.DEFAULT_PERMISSION)
.execute(client).isSuccess());
Activity sut = activityRule.launchActivity(null);
getInstrumentation().waitForIdleSync();
EventBus.getDefault().post(new SearchEvent("",
SearchRemoteOperation.SearchType.SHARED_FILTER));
getInstrumentation().waitForIdleSync();
Screenshot.snapActivity(sut).record();
}
@Test
public void showAccounts() {
Activity sut = activityRule.launchActivity(null);
@@ -17,11 +17,16 @@ import com.owncloud.android.datamodel.FileDataStorageManager;
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.files.ReadFolderRemoteOperation;
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation;
import com.owncloud.android.lib.resources.files.model.RemoteFile;
import com.owncloud.android.utils.FileStorageUtils;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -42,6 +47,7 @@ import androidx.test.runner.lifecycle.Stage;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static org.junit.Assert.assertTrue;
/**
@@ -102,6 +108,22 @@ public abstract class AbstractIT {
}
}
@After
public void after() {
RemoteOperationResult result = new ReadFolderRemoteOperation("/").execute(client);
assertTrue(result.getLogMessage(), result.isSuccess());
for (Object object : result.getData()) {
RemoteFile remoteFile = (RemoteFile) object;
if (!remoteFile.getRemotePath().equals("/")) {
assertTrue(new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client).isSuccess());
}
}
}
FileDataStorageManager getStorageManager() {
return new FileDataStorageManager(account, targetContext.getContentResolver());
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 23 KiB

@@ -473,7 +473,7 @@ public abstract class DrawerActivity extends ToolbarActivity
}
break;
case R.id.nav_shared:
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.SHARED_SEARCH),
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.SHARED_FILTER),
menuItem.getItemId());
break;
case R.id.nav_recently_modified:
@@ -191,7 +191,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
protected SearchType currentSearchType;
protected boolean searchFragment;
protected SearchEvent searchEvent;
protected AsyncTask remoteOperationAsyncTask;
protected AsyncTask<Void, Void, Boolean> remoteOperationAsyncTask;
protected String mLimitToMimeType;
@Inject DeviceInfo deviceInfo;
@@ -388,6 +388,10 @@ public class OCFileListFragment extends ExtendedListFragment implements
currentSearchType = SearchType.RECENTLY_MODIFIED_SEARCH;
break;
case SHARED_FILTER:
currentSearchType = SearchType.SHARED_FILTER;
break;
default:
// do nothing
break;
@@ -1587,7 +1591,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
}
};
remoteOperationAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, true);
remoteOperationAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@Subscribe(threadMode = ThreadMode.BACKGROUND)
@@ -1700,7 +1704,8 @@ public class OCFileListFragment extends ExtendedListFragment implements
return event != null &&
event.getSearchType() != null &&
(!TextUtils.isEmpty(event.getSearchQuery()) ||
event.searchType == SearchRemoteOperation.SearchType.SHARED_SEARCH);
event.searchType == SearchRemoteOperation.SearchType.SHARED_SEARCH ||
event.searchType == SearchRemoteOperation.SearchType.SHARED_FILTER);
}
private void syncAndCheckFiles(Collection<OCFile> files) {
+1
View File
@@ -251,6 +251,7 @@
<string name="error_retrieving_file">S\'ha produït un error mentre es recuperava el fitxer</string>
<string name="error_retrieving_templates">S\'ha produït un error recuperant les plantilles</string>
<string name="error_starting_direct_camera_upload">S\'ha produït un error iniciant la càmera</string>
<string name="etm_accounts">Comptes</string>
<string name="etm_preferences">Preferències</string>
<string name="etm_title">Mode de proves d\'enginyeria</string>
<string name="fab_label">Afegeix o carrega</string>
+1
View File
@@ -250,6 +250,7 @@
<string name="error_retrieving_file">Fejl ved modtagelse af fil</string>
<string name="error_retrieving_templates">Fejl ved indlæsning af modeller</string>
<string name="error_starting_direct_camera_upload">Fejl ved start af kamera</string>
<string name="etm_accounts">Konti</string>
<string name="etm_preferences">Indstillinger</string>
<string name="etm_title">Udviklers test tilstand</string>
<string name="fab_label">Tilføj eller send</string>
+1
View File
@@ -174,6 +174,7 @@
<string name="end_to_end_encryption_dialog_close">Cerrar</string>
<string name="error__upload__local_file_not_copied">%1$s no pudo ser copiado a la carpeta local %2$s</string>
<string name="error_cant_bind_to_operations_service">Error crítico: No se pueden realizar operaciones</string>
<string name="etm_accounts">Cuentas</string>
<string name="fallback_weblogin_back">Atrás</string>
<string name="fallback_weblogin_text">Regresar al antiguo método de inicio de sesión</string>
<string name="favorite">Agregar a tus favoritos</string>
+1
View File
@@ -256,6 +256,7 @@
<string name="error_retrieving_file">Produciuse un erro ao recuperar o ficheiro</string>
<string name="error_retrieving_templates">Produciuse un erro ao recuperar modelos</string>
<string name="error_starting_direct_camera_upload">Produciuse un erro ao iniciar a cámara</string>
<string name="etm_accounts">Contas</string>
<string name="etm_preferences">Preferencias</string>
<string name="etm_title">Modo de proba de enxeñería</string>
<string name="fab_label">Engadir ou enviar</string>
+1
View File
@@ -568,6 +568,7 @@
<string name="sync_file_nothing_to_do_msg">Failo turinys jau sunchronizuotas</string>
<string name="sync_foreign_files_forgotten_ticker">Keli vietiniai failai buvo užmiršti</string>
<string name="sync_in_progress">Gaunama paskiausia failo versija.</string>
<string name="sync_not_enough_space_dialog_title">Trūksta vietos</string>
<string name="sync_string_files">Failai</string>
<string name="synced_folder_settings_button">Nustatymų mygtukas</string>
<string name="synced_folders_configure_folders">Konfigūruokite aplankus</string>
+1
View File
@@ -256,6 +256,7 @@
<string name="error_retrieving_file">Erro ao recuperar o arquivo</string>
<string name="error_retrieving_templates">Erro recuperando modelos</string>
<string name="error_starting_direct_camera_upload">Erro ao inicializar a câmera</string>
<string name="etm_accounts">Contas</string>
<string name="etm_preferences">Preferências</string>
<string name="etm_title">Modo de Teste de Engenharia</string>
<string name="fab_label">Adicionar ou enviar</string>
+5
View File
@@ -169,6 +169,7 @@
<string name="copy_move_to_encrypted_folder_not_supported">Şifrelenmiş bir klasöre kopyalama ve taşıma işlemleri henüz desteklenmiyor.</string>
<string name="copy_to">Şuraya kopyala …</string>
<string name="could_not_download_image">Tam boyuttaki görsel indirilemedi</string>
<string name="could_not_retrieve_url">Adres alınamadı</string>
<string name="create_dir_fail_msg">Klasör oluşturulamadı</string>
<string name="create_new">Yeni ekle</string>
<string name="create_new_document">Yeni belge</string>
@@ -672,6 +673,10 @@
<string name="sync_foreign_files_forgotten_explanation">1.3.16 sürümünden sonra, veri kaybının önlenebilmesi için bu aygıttan yüklenen dosyalar, bir dosya birden fazla hesapla eşitlendiğinde %1$s yerel klasörüne kopyalanır.\n\nBu değişiklikten dolayı, bu uygulamanın yüklenmiş tüm önceki sürümündeki dosyalar %2$s klasörüne kopyalandı. Ancak hesap eşitlemesi sırasında bu işlemin tamamlanmasını engelleyen bir sorun çıktı. Dosyaları olduğu gibi bırakabilir ve %3$s bağlantısını kaldırabilir ya da dosyaları %1$s klasörüne taşıyıp %4$s bağlantısını koruyabilirsiniz.\n\nYerel dosyaları ve bağlı oldukları %5$s içindeki uzak dosyaların listesini aşağıda görebilirsiniz.</string>
<string name="sync_foreign_files_forgotten_ticker">Bazı yerel dosyalar unutulmuş</string>
<string name="sync_in_progress">Lütfen dosyanın en son sürümü alınırken bekleyin.</string>
<string name="sync_not_enough_space_dialog_action_choose">Eşitlenecek ögeleri seçin</string>
<string name="sync_not_enough_space_dialog_action_free_space">Yer aç</string>
<string name="sync_not_enough_space_dialog_placeholder">%1$s, %2$s, ancak aygıt üzerinde yalnız %3$s yer var.</string>
<string name="sync_not_enough_space_dialog_title">Yeterli alan yok</string>
<string name="sync_status_button">Eşitleme durumu düğmesi</string>
<string name="sync_string_files">Dosyalar</string>
<string name="synced_folder_settings_button">Ayarlar düğmesi</string>
+1
View File
@@ -141,6 +141,7 @@
<string name="end_to_end_encryption_wrong_password">Lỗi khi giải mã. Sai mật khẩu?</string>
<string name="error_cant_bind_to_operations_service">Lỗi nghiêm trọng: Không thể thực hiện thao tác</string>
<string name="error_comment_file">Lỗi khi bình luận tập tin</string>
<string name="etm_accounts">Tài khoản</string>
<string name="fab_label">Thêm hoặc tải lên</string>
<string name="fallback_weblogin_back">Quay lại</string>
<string name="favorite">Thêm vào ưa thích</string>
@@ -0,0 +1,6 @@
706ae93a3 Merge remote-tracking branch 'origin/master' into dev
045a7aa9e Merge pull request #5466 from nextcloud/squareIcon
eefeda930 Add square google icon
7156aaff2 [tx-robot] updated from transifex
57ce989a5 daily dev 20200213
library commit: cece3b5214b09bcaac5c3f890ea67b344ed06424
@@ -0,0 +1,7 @@
020e5a2c3 Merge remote-tracking branch 'origin/master' into dev
490b292ad Merge pull request #5300 from nextcloud/sharedSearchAgain
61027524f test
af93382c6 test
68f06ea15 [tx-robot] updated from transifex
2d82f80e9 daily dev 20200214
library commit: cece3b5214b09bcaac5c3f890ea67b344ed06424