Commit graph

945 commits

Author SHA1 Message Date
Camila
b4882ae5c7 Update tests for ActivityData.
Signed-off-by: Camila <hello@camila.codes>
2023-01-27 12:30:01 +00:00
Matthieu Gallien
602b8db5e2
handle case clash conflicts in a similar way to content conflicts
introduce a new type of conflict for case clash filename conflicts

add proper handling including a new utility class to solve them and a
new dialog for the user to pick a fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-01-25 16:37:35 +01:00
Claudio Cambra
e993684775
Remove faulty else statement from TestFolderman that would erroneously cause failure
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:16 +01:00
Claudio Cambra
352c660363
Ensure mocked database entries are correct in TestFolderMan
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:16 +01:00
Claudio Cambra
b7311278a8
Fix folderman delete encrypted files test
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:16 +01:00
Claudio Cambra
12b2673ac2
Add test for deleting encrypted files
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:15 +01:00
Claudio Cambra
c59ab85e22
Make accountstate fakeable for tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:14 +01:00
alex-z
50ffc7373f Update file's metadata in the local database when the etag changes while file remains unchanged. Fix subsequent conflict when locking and unlocking.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-30 16:57:32 +01:00
alex-z
089b677633 Fix SyncEngineTest failure when localstate is destroyed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-15 10:32:10 +01:00
Claudio Cambra
294ec8a2b6
Fix bad remote path in sharetestutils fakefolder, which led to failed FakePropfindReply being provided in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-12-13 17:40:16 +01:00
Claudio Cambra
9b5be727b1
Incorporate internal link share into tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-12-13 17:33:38 +01:00
Christian Göttsche
1a83894074 Fix typo
Found by Lintian.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2022-12-13 09:22:58 +01:00
Matthieu Gallien
af49e1079a fix test and code to not stop on case clash errors
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-30 11:49:35 +01:00
Matthieu Gallien
b68754827c case clash should not prevent full propagation
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-30 11:49:35 +01:00
alex-z
16153b33b7 Fix CfApiShellExtensionsIPCTest.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-11-25 15:03:24 +01:00
Matthieu Gallien
04b4354535 fix include style to always use "" for files from the project
the use of #include <> is only for system headers and not headers from
the project

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-25 09:07:02 +01:00
Matthieu Gallien
e7605d505d avoid modifying real configuration file: use temp folder
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-25 09:07:02 +01:00
Matthieu Gallien
6050d4f0fb fix code format
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-23 17:34:05 +01:00
Matthieu Gallien
1e12fc951d prevents modifying real user config file
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-23 17:34:05 +01:00
Claudio Cambra
dfcf97654c Always build E2E tests, but only add to test suite if enabled
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-11-23 08:40:46 +01:00
Claudio Cambra
da6724be8c Add a file transfer e2e test
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-11-23 08:40:46 +01:00
Claudio Cambra
55cd79f4ef Add a test to check e2e server test setup
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-11-23 08:40:46 +01:00
Claudio Cambra
53abfb4785 Add an end to end test utils file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-11-23 08:40:46 +01:00
Matthieu Gallien
b04128fd34 set mtime when building local sync folder state in automated tests
would allow checking mtime with a correct value instead of having a
default value

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-22 15:08:46 +01:00
Matthieu Gallien
c379879e30 check that we update local file mtime on changes from server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-22 15:08:46 +01:00
allexzander
6affc6e6ab Implement 'Leave this share' context menu entry. Fix incorrect sharing state for incoming and my shares in custom state icons and local database.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-11-22 12:14:20 +01:00
Matthieu Gallien
26fd4d2226 tidy some loop related code: avoid one letter variable names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-18 16:02:21 +01:00
Matthieu Gallien
b5adbf3ab0 fix instances of: c++11 range-loop might detach Qt container warnings
analyzed via clazy

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-18 16:02:21 +01:00
Matthieu Gallien
8fa727e299
test for proper renaming of folder parent of a deep hierarchy
currently broken test as we miss to rename recursively

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-17 14:47:01 +01:00
Matthieu Gallien
61c792c6f4
fully qualify types in signals and slots
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-15 09:57:54 +01:00
Matthieu Gallien
d70d4f61ec properly escape a path when creating a test file during tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-09 18:35:10 +01:00
Matthieu Gallien
783cefe3f1 new autotest to ensure that we delete folders despite blacklist errors
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-07 18:33:13 +01:00
Claudio Cambra
63354f8432
Add testing for SortedShareModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:13 +01:00
Claudio Cambra
7ba6969e65
Moved all server mocking code for share model test to independent ShareTestUtils file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:10 +01:00
Claudio Cambra
a0ff46a7fb
Add testing for ShareeModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:09 +01:00
Claudio Cambra
e021f25634
Add a suite of tests for ShareModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Test ShareModel error handling

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Improve testing of user/group shares in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Add testing for maximum share expire date enforcement in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:09 +01:00
Camila
f8b3ad8852 Update tests.
Signed-off-by: Camila <hello@camila.codes>
2022-10-17 11:29:23 +00:00
Matthieu Gallien
a378c4d80a add extra tests for lock files to better capture desired behavior
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-11 16:01:58 +02:00
Matthieu Gallien
d371855e56 test that files soon to be expired will be synced automatically
try to ensure that we properly sync again files for which lock has
expired

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-11 16:01:58 +02:00
allexzander
289a641d74 VFS Windows: Display the sharing state and lock state in the 'Status' column of Windows Explorer
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-10-04 18:32:51 +02:00
Claudio Cambra
ff5261eaf1 Check local file locked and unlocked correctly in testlocaldiscovery
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-04 11:52:23 +02:00
Matthieu Gallien
565a5f0999 add [[nodiscard]] attribute via clang-tidy
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-nodiscard' -fix
under linux with most part of our code covered

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 11:14:45 +02:00
Matthieu Gallien
5fc017575b fix [[nodiscard]] single warning
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 11:14:45 +02:00
Matthieu Gallien
9b7d1add52 apply modernize-use-using via clang-tidy
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-using' -fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 01:32:46 +02:00
Camila
1ccc170f91
Update tests to follow 'Reply' change of primary action.
Signed-off-by: Camila <hello@camila.codes>
2022-09-29 17:15:50 +02:00
Camila
7633cc490d
Fix 'Reply' action primary property.
Primary is set to true when object type is 'room' or 'chat' and it set to
false when object type is 'call'.

Signed-off-by: Camila <hello@camila.codes>
2022-09-29 15:20:56 +02:00
Claudio Cambra
e721b03106 Remove sorting code in activitylistmodel as not needed with sortedactivitylistmodel
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-26 18:18:34 +02:00
allexzander
ffb7fcad7d Fix deprecation warnings.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
5175d186a4 Do not ignore return values for SyncJournalDB in unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
Claudio Cambra
1a5fa50fbb Refactor ActivityListModel population mechanisms
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-13 19:34:41 +02:00
alex-z
2a529eef3c Make sure Folder is deleted from the list and the SyncJournalDB is closed for every folder of the account that has been removed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-09-10 10:34:34 +02:00
alex-z
f0b9ecd747 Check folder invalidity reson when deciding to enable or disable the 'Finish' button in a Wizard page.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-09-10 10:34:34 +02:00
Matthieu Gallien
2cb88952fb fix build of windows virtual files automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-09-05 12:30:49 +02:00
Claudio Cambra
d86f25d215 Make UserStatusSelector a dismissible page pushed onto the tray window
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-08-10 09:22:33 +00:00
Matthieu Gallien
8551a14c48 ensure SyncEngine use an initialized instance of SyncOptions
will prevent nextcloudcmd command line client from ignoring the settings
handled by SyncOptions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-08-08 12:36:37 +03:00
alex-z
001deace2d Implement COM Dll for CfApi shell extensins. Implement Thumbnail Provider.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-07-29 19:26:53 +03:00
Claudio Cambra
cf372b43ac Properly adapt the userstatusselectormodel, eliminate hacks, make code more declarative
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-07-12 21:10:26 +02:00
Claudio Cambra
b7c2e16aa9 Make client language gender-neutral and more clear
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-06-24 14:36:36 +02:00
alex-z
300446579c Fail build when Windows tests fail. Use GH Actions to build and run Windows tests. Create coverage and uppload it to codecov.io.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-06-10 15:18:54 +03:00
Matthieu Gallien
5f6277b3ee if an exclude file is deleted, skip it and remove it from internal list
ignore files can be removed: not an error so adjust tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-16 21:00:52 +02:00
alex-z
53654b2a50 Allow manual renaming of files and folders with spaces. Allow uploading invalid file name via the InvalidFileName dialog.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-05-16 18:07:26 +03:00
Claudio Cambra
b6def51945 Fix notifications not being shown when they should be
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-05-16 14:28:33 +02:00
Camila
e4a0d57bc8
Do not replace strings in action links coming from the notification api.
Signed-off-by: Camila <hello@camila.codes>
2022-05-12 12:47:48 +02:00
Matthieu Gallien
b55a099b61 allow lock/unlock of files from files explorer integration
add new commands to the contextual menu provided by our files explorer
plugins to allow locking/unlocking a file

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
2ea68d75bd add automated tests for LockFileJob to validate proper behavior
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
dc95f29165 fetch and store in sync database information abot lock state of files
fetch lock properties from server

decode them and store them in sync database

test to ensure we do properly handle those properties

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
860d7dd9de detect capabilities for lock/unlock of files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Camila
56825825b5
Update ActivityListModel tests.
Signed-off-by: Camila <hello@camila.codes>
2022-04-06 10:38:01 +02:00
Matthieu Gallien
908066072a avoid deleting renamed file with spaces in name
ensure that normal sync engine will nto delete new file renamed due to
trailing/leading spaces in name

rename before upload in the same job to avoid having invalid state in
local desktop client database to ensure any subsequent run of the sync
engine will not make wrong decisions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-04-06 07:32:02 +00:00
Claudio Cambra
3d086ae305 Fix dark mode stuff relating to unified search, fix macOS auto dark/light theme switching not always working, fix Windows detection of dark/light theme switching
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-28 09:21:35 +00:00
Matthieu Gallien
dc0026704e ensure discovery phase will not try to upload files with invalid mtime
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
b5a10d7829 add new tests dedicated for recovery scenario of wrong mtime on server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
d4081c99a7 prevent updating files when that would result in invalid mtime
ensure that we never try to sync a file with a sync that would result in
setting it up to an invalid mtime

test a recovery scenario with plain old sync folder and virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
541447723a remove all usage of QDateTime::toTime_t() to avoid overflow
QDateTime::toTime_t() can overflow if called with a date outside its
domain of working

this method is obsolete and QDateTime::toSecsSinceEpoch() is the
replacement

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Camila
73bae8cd30
Add TalkReply class and tests.
- Add struct TalkNotificationData to handle token and messageId.
- Handle chat and call notifications with the new struct.
- Add talk token and messageId to data roles in ActivityListModel.
- Add Talk Reply component to the ActivityList.
- User Loader to display the TalkReply component.
- Move Talk Reply from ActivityItem to ActivityItemContent due to PR #4186.
- Use TextField instead of Text.
- Disable send reply button instead of changing border color when field is empty.

Signed-off-by: Camila <hello@camila.codes>
2022-03-17 17:50:33 +01:00
Claudio Cambra
65f2bada3e Add thumbnails for files in the activity view
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-17 10:46:09 +00:00
Claudio Cambra
02f3a1aed6 File activity dialog now works for all file actions activities (e.g. deleted files)
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-16 08:38:14 +01:00
alex-z
01eb050cd8 Do not remove files from a Group folder and its nested folders whe it is renamed or removed while not allowed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-03-09 10:54:39 +02:00
alex-z
37168fce9f Fix review comments.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
1a300d0d56 Unit tests for new files restore logic when the parent folder is removed on the server.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
3443de4388 Rollback local move when server move has failed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-23 16:53:26 +02:00
Matthieu Gallien
e4590d7a3b ensure that bulk upload network job errors are handled
in case we get a network error during bulk propagator POST network
request, report all files within this upload as files in error that will
then be sent using the plain old WebDAV protocol

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-11 09:44:20 +01:00
Matthieu Gallien
d0c2570b04 simplify sync folder in some automated local discovery tests
should be faster and easier to understand

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien
8decd475e5 clean transition when files with spaces exist already
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien
e89268bdd7 ensure we emit a rename command for renamed files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:05 +00:00
alex-z
ae44dd5978 Adjust icons for activity entries in main dialog. Refactor the dialog by splitting it to separate components.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-04 17:52:37 +02:00
Claudio Cambra
ce5494b4ec Add testing for ActivityListModel
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-02-01 13:57:08 +00:00
alex-z
225753a8c0 Refactor DeleteJob and DeleteApiJob to use SimpleFileJob.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
190d278fd4 Checksum validation PropagateDownload unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
5b0e2d8ed0 Checksum validator unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
b7be10f712 Ask server to recalculate checksum on validatin failure.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
Matthieu Gallien
c88f57b42d check modified time sent by upload jobs in automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-01-11 08:46:11 +00:00
Matthieu Gallien
6ceb45bac4 test files that should be renamed in sub-directory
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-07 11:35:38 +01:00
Matthieu Gallien
18ef471332 let auto tests of batch upload return proper file paths
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien
c194605c35 implement bulk upload
add PutMultiFileJob to send many files at once

use it in BulkPropagatorJob to implement bulk upload feature

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien
112be18635 read capabilities for bulk upload from server
use it in dedicated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
rakekniven
416d98716f Make argument singular to fix i18n issue
Reported at Transifex.
See https://www.transifex.com/nextcloud/nextcloud/translate/#hu_HU/client/309577611

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2021-11-05 10:00:17 +01:00
alex-z
2f3c58daac Fix review comments. Use QImage for QML and QPixmap for rest of code. Do not cache images for QML. Fix tests. Use signal in QML.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-04 20:50:51 +00:00
alex-z
0b8ab5c079 Use SvgRenderer for Unified Search input icons. Refactor IconUtils. Extend unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-04 20:50:51 +00:00
alex-z
c52718c104 Replace deprecated QRegExp with QRegularExpression.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-02 08:54:06 +00:00
Camila
5decbd0b21
Expand ExcludedFiles tests.
Signed-off-by: Camila <hello@camila.codes>
2021-10-28 11:38:03 +02:00
Camila
5788f35e82
Skip sync exclude file from list of exclude files if it doesn't exist.
The file might not exist anymore because the user deleted it by hand or
the folder where it was located got unchecked in the selective sync
view. It is a fix for #2632.

Signed-off-by: Camila <hello@camila.codes>
2021-10-28 11:37:56 +02:00
Matthieu Gallien
87c583dcb6 schedule files upload after all other jobs have been completed
should allow smarter policy dedicated to optimizing files upload

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-26 14:26:28 +02:00
Matthieu Gallien
c6344c05be add test to check the order of actions when uploading new files
should allow to check that uploads are delayed after directories are
created

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-26 12:45:15 +02:00
Matthieu Gallien
69d6f4acec our source code files have lower case names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-25 15:38:21 +02:00
alex-z
c1dab7e4cb Unified Search via Tray window
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-10-25 14:45:05 +03:00
Felix Weilbach
df11424596 Trim trailing spaces before uploading files
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-10-14 11:22:59 +00:00
Guido Falsi
5667a6aad2 Fix BUILD_TESTING on non Linux unices
vfs_xattr is build only if LINUX is defined, but when building tests it is depended upon when UNIX is defined.

This patch requires it only when LINUX is defined.

Signed-off-by: Guido Falsi <mad@madpilot.net>
2021-10-12 16:32:24 +02:00
Matthieu Gallien
833237b2e4 use alias target for internal libraries
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-06 07:56:33 +00:00
Camila
1de38a13f3 Extend TestCapabilities with shareDefaultPermissions tests.
Signed-off-by: Camila <hello@camila.codes>
2021-09-27 08:53:45 +00:00
Felix Weilbach
8a8d488454 Add dialog to set user status
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-09 11:18:22 +02:00
Felix Weilbach
5622c33f40 Fix various deprecated warnings
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Felix Weilbach
45f59e7eca Use QDateTime::startOfDay()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Felix Weilbach
0af83dd1b6 Use QRandomGenerator instead of qrand
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
allexzander
a3fc812539 Enable share to Talk and Email. Display correct icon. Added unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-09-06 13:27:39 +00:00
Matthieu Gallien
d17d831205 switch from Q_DECL_OVERRIDE to plain override
our requirements guarantee availability of override keyword so we just
use it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:57 +00:00
Matthieu Gallien
25669938fd let clang-tidy add missing override after enabling again the check
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:56 +00:00
Hannah von Reth
acd83a2998 Ensure unit test are using absolute paths 2021-08-23 09:44:34 +02:00
Hannah von Reth
5a7fd3f316 testlockedfiles use long file path 2021-08-23 09:40:27 +02:00
Hannah von Reth
8ca5035c42 Add test for csync_vio_local_stat with long path 2021-08-23 09:40:27 +02:00
Hannah von Reth
56364f1c70 Fix unittests 2021-08-23 09:40:27 +02:00
Klaas Freitag
73549a0529 Ignore the desktop.ini file in every directory, not only in top dir. (#8299)
* Ignore the desktop.ini file in every directory, not only in top dir.

See https://github.com/owncloud/client/issues/8298  for reasons.

* Fix test for ignoring desktop.ini everywhere.

Co-authored-by: Hannah von Reth <hannah.vonreth@owncloud.com>
2021-08-23 09:40:26 +02:00
Hannah von Reth
3a87067348 Cleanup 2021-08-23 09:40:26 +02:00
Hannah von Reth
de2d11125b Move Prepared sql queries to seperate class to manage access 2021-08-23 09:40:26 +02:00
allexzander
ba73b6d914 VFS + E2EE. Improved data alignment and unit tests for StreamingDecryptor. Refactoring and renaming for readability.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander
2c78925acb VFS + E2EE VFS implicit hydration of E2EE files.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
Nicolas Fella
43cccb0a73 Don't use variables for CMake target identifiers
This makes the code a bit nicer to read and maybe a bit more robust.

Set the relevant OUTPUT_NAME target properties to keep the ability to
customize the names of the installed binaries.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-08-19 10:30:23 +00:00
Felix Weilbach
ccd27870a7 Don't compare integers with different signs
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Felix Weilbach
acf6cc0527 Remove unused functions and variables
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Felix Weilbach
d72f7e9109 Check result of setPinState()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Hannah von Reth
3b99b11849 Always reset prepared sql statements
This allow the creation of checkpoints and fixes the growing wal issue

Fixes: #7646
2021-08-11 17:13:44 +00:00
Hannah von Reth
1284d78599 Fix testblacklist.cpp
The test was broken because we now actually have X-Request-ID set
2021-08-11 17:13:44 +00:00
Hannah von Reth
b01973f95f Enable httplogger on unittests 2021-08-11 17:13:44 +00:00
Hannah von Reth
1b3502bd5a Fix httplogger in unittests with lambdas 2021-08-11 17:13:44 +00:00
Valdnet
dbd061c44b l10n: Replace apostrophe with double quotation. Remove double space and sort sentence.
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-08-03 15:00:53 +03:00
allexzander
71b2b73881 Fix tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-30 06:21:05 +00:00
Matthieu Gallien
badb5c1fba fix review comment
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-29 08:27:53 +00:00
Matthieu Gallien
391935c90f prevent crash in Accont::davPath without credentials
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-29 08:27:53 +00:00
Matthieu Gallien
77433f7e1d in wizard always use the correct way to get dav path
fixes listing being incorrect when using dav endpoint

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-28 09:45:49 +00:00
allexzander
88d18fd5f3 Invoke 'bool Folder::isSyncRunning() const' from tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-28 08:58:00 +00:00
allexzander
8122c63ebc Revert Added config parameter that allows to bypass checksum validation failure.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-28 07:57:10 +00:00
Felix Weilbach
3e61bdc431 Use dav instead of webdav
Fixes #3342

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-07-16 12:42:02 +00:00
Matthieu Gallien
8ad6f89fed bring back dynamic load of VFS plugins
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-08 08:11:17 +00:00
Felix Weilbach
2ee3ca02a4 Add unit test for move custom remote root
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-25 10:14:29 +00:00
Felix Weilbach
27f8152b05 Remove unused function declaration
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-17 11:22:57 +00:00
allexzander
dc72686ab3 Allow download with mismatched checksum if a config option is set.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-10 13:39:11 +03:00
allexzander
fe9f934277 Added unit tests for Utility::isPathWindowsDrivePartitionRoot.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-02 10:30:27 +03:00
Dmytro Korchynskyi
8b6b3023ea use folders in CMake
Signed-off-by: Dmytro Korchynskyi <kdl.dima@gmail.com>
2021-05-18 09:59:17 +03:00
Hannah von Reth
17a1a630a4 Use the http logger with the unittests
This allow better debugging of the tests

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-06 07:35:59 +00:00
Felix Weilbach
7112d2aa78 Push Notifications: Reconnect forever if capabilities allow it
Fixes #3115

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-04 10:05:19 +02:00
Felix Weilbach
aea867c445 Refactor push notification tests
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-04 07:27:06 +00:00
Felix Weilbach
d21df33a50 Add missing copyright headers for push notifications
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-04 07:27:06 +00:00
Felix Weilbach
da1e5c448a CMake: Use own SQLite3 on macOS and Windows
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-15 08:51:06 +02:00
Felix Weilbach
b736355985 Add notification cache
The notification cache helps to not display duplicate desktop
notifications to the user.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-13 14:58:50 +00:00
Felix Weilbach
b256c6e694 Ping websocket server
This helps the client to recognize if the websocket server is still alive.

Fixes #2983

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-13 12:19:40 +00:00
Felix Weilbach
d7499b0746 Refactor push notification test utils
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-13 12:19:40 +00:00
Felix Weilbach
9185956069 Split out wizard welcome page
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-10 09:55:40 +01:00
allexzander
4d66d209bc Fix incorrect logger output for non-latin strings.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-16 09:30:08 +02:00
Felix Weilbach
02dd363feb Add test utils library
The test utils library collects all dependencies that are needed for
tests and gets automatically linked with every test.

Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-02-02 13:35:04 +00:00
Felix Weilbach
73a41d8e34 Compile nextcoud gui as separate library
Compiling nextcoud gui as a separate library. This is needed to more
easily write tests. The whole nextcloud application can now be linked
against the tests.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-02 13:35:04 +00:00
allexzander
8c4d5333c1 Use push notifications for Tray activities/notifications fetch trigger.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-27 19:53:28 +02:00
Kevin Ottens
ebfe51b7e7 Don't treat new folders in unpinned folders as files to dehydrate
This would only happen if the parent of the newly created folder would
be explicitly set to online only, hence why it went under the radar
previously.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 17:09:24 +00:00
Felix Weilbach
78f00acaa2 Add push notifications for file changes
Resolves #2802

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-01-25 17:01:09 +00:00
Kevin Ottens
1aeb77c967
Add the XAttr backend prototype with its test suite
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Dominik Schmidt
69915ab594
Fix testVersionOfInstalledBinary for brandings 2020-12-30 16:17:47 +01:00
Dominik Schmidt
67f9890320
Use owncloudcmd in testVersionOfInstalledBinary
... as it works without X in CI.
2020-12-30 16:17:47 +01:00
Dominik Schmidt
635d2b2da2
Fix style 2020-12-30 16:17:47 +01:00
Hannah von Reth
1144473f5d
Cleanup pathtoUNC and its test 2020-12-30 16:17:46 +01:00
Kevin Ottens
46a5bd6b25
Ensure we properly cancel hydration on server errors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:59 +01:00
Kevin Ottens
90fbb7d322
Implement callback between wrapper and vfs object for hydration requests
This comes with a test simulating an open request coming from another
process (although in our case it's really just a thread). The actual
hydration works as expected by cfapi, handling of encrypted files is for
now missing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
5d013accea
Improve test readability with a bunch of macros
Since we often checked the same file states to see if they were virtual,
non virtual or gone, let's factor this out. This way intent in tests is
clearer.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
691ab9a40a
Port the tests to the CfApiWrapper
This reduces code duplication and opportunities of mistakes between the
test and the implementation.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
423780bf79
Add initial version of the CfApi backend
For now this implements only the logic necessary to get a test suite
equivalent to the TestSyncVirtualFiles one to pass. It doesn't (yet)
honor request to fetch files from the system.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
rakekniven
267d987895 Changed spelling of "etag".
Signed-off-by: rakekniven <mark.ziegler@rakekniven.de>
2020-12-28 08:51:56 +00:00
Kevin Ottens
0756497c3e
Get the excluded files test to pass again on Windows
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Kevin Ottens
c57eff6fd8
Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Hannah von Reth
40e07ef3e3
Fix unit tests by setting Date header 2020-12-15 11:01:52 +01:00
Hannah von Reth
6818b8e303
Speedup test build by compile the fake server just once 2020-12-15 10:59:27 +01:00
Hannah von Reth
befc373ea6
Fix test on systems where C:\ is not writeable 2020-12-15 10:59:27 +01:00
Hannah von Reth
440b31986a
Ensure the callback is triggered 2020-12-15 10:59:25 +01:00
Hannah von Reth
f6faba48e2
Don`t block main thread when displaying all files removed dialog
Fixes: #8170
2020-12-15 10:59:25 +01:00
Hannah von Reth
0c57bb8869
Remove the use of goto from test/csync/std_tests/check_std_c_jhash.c 2020-12-15 10:59:19 +01:00
Hannah von Reth
23f7c51f70
Print checksum on mismatch 2020-12-15 10:59:18 +01:00
Hannah von Reth
bd62615aab
Clazy: Fix some warnigns 2020-12-15 10:59:17 +01:00
Hannah von Reth
563b347567
csync: apply strict QString handling 2020-12-15 10:59:16 +01:00
Hannah von Reth
82dbf8b5e1
VFS: remove now unused parameter 2020-12-15 10:59:16 +01:00
Hannah von Reth
4589772393
Remove more legacy C code 2020-12-15 10:59:15 +01:00
Hannah von Reth
3dcbc9fa66
Tests: Port check_vio_ext to Windows 2020-12-15 10:59:15 +01:00
Hannah von Reth
47dc7e6c49
Remove custome string functions 2020-12-15 10:59:15 +01:00
Hannah von Reth
f932dfc648
VFS: Tell the vfs plugin whether we have multiple accounts
This allows us to decide on the presentation of the account
2020-12-15 10:59:14 +01:00
Hannah von Reth
a0d81df21e
UnitTests: Set a CookiesJar in FakeQNAM 2020-12-15 10:59:13 +01:00
Hannah von Reth
4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Hannah von Reth
86789a1280
Test: Disable parallelism to ensure serial execution 2020-12-15 10:59:10 +01:00
Olivier Goffart
317d3735d7
SocketAPI: fix status after a failure to move
Issue #7759
2020-12-15 10:59:09 +01:00
Hannah von Reth
734e49765d
Test: Fix testMovedWithError for vfs mode 2020-12-15 10:59:09 +01:00
Hannah von Reth
85aefa4232
Sync: Fix handling of virtual files in error state
Issue: #7799
2020-12-15 10:59:09 +01:00
Hannah von Reth
7644be576f
Test: Add test for vfs failed move crash 2020-12-15 10:59:09 +01:00
Olivier Goffart
a6a0e361c1
fixup test 2020-12-15 10:59:07 +01:00
Olivier Goffart
9f2c67dca9
Tests: add a couple of move tests
This was an attempt to reproduce #7722, but this actually does not
reproduce it
2020-12-15 10:59:07 +01:00
Hannah von Reth
9564e5e92e
Fix saving of cookies
Fixes: #7700
2020-12-15 10:59:06 +01:00