Commit Graph

1008 Commits

Author SHA1 Message Date
Matthieu Gallien
4b710c66b6 fix(moveToTrash): enable use of move to trash in some automated tests
should improve coverage for move to trash feature to ensure this is
working as expected by users

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-30 07:07:46 +00:00
Matthieu Gallien
2286255635 fix(rename): avoid hitting runtime assert when renaming virtual files
when propagating a rename to the child items, we must not make child
items be done from propagator point of view

they will be part of their own propagator item and that will create
issues

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:51:24 +02:00
Matthieu Gallien
47b3a5c8ca fix(rename): handle complex rename/move scenario
ensure we do not leak records and properly update them in client
database

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:51:24 +02:00
Matthieu Gallien
f85ea35b4e fix(autotests): do not remove read-only files already removed
the sync engine will remove invalid items inside read-only folders

not needed to remove them in tests and rather checks that they were
indeed removed

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:01:34 +02:00
Matthieu Gallien
9859966183 fix(permissions): solve issues with file permissions automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:01:34 +02:00
Matthieu Gallien
aeca14f522 fix(read only folder): allow renaming new file inside read-only folders
needed to download a new file inside a read-only folder

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-24 11:01:34 +02:00
Claudio Cambra
9da26d79bb Use AccountPtr in testpushnotifications
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-04-15 14:13:34 +02:00
Matthieu Gallien
abd4cf5252 skip single test or whole test file for macOS: they are broken
would need careful analyze to fix those

until we can get them fixed, better make the other tests be required in
the CI

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-15 13:44:51 +02:00
Camila Ayres
f4146a621b test(cfapi): check for spurious attribute changes.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-04-15 08:30:25 +00:00
Matthieu Gallien
1a5d043f79 fix: do not interrupt sync when cleaning invalid read-only items
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-14 16:38:43 +00:00
Matthieu Gallien
f0a9c5a302 disable use of bulk upload for small files
this feature causes many issues with impact on users so we prefer to
disable it again

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:56:34 +00:00
Matthieu Gallien
b0067c3988
use maximum chunk size to decide the size of a bulk upload request
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 14:55:41 +02:00
Camila Ayres
454a7a5768
Add test for syncing with bulk upload when there are errors.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-04-10 14:54:13 +02:00
Matthieu Gallien
89a0af11fa with release 32.0.0 md5 custom checksum is removed from bulkupload
makes our fake server require an md5 custom checksum for bulk upload
until version 32.0.0

starting with 32.0.0 this custom checksum must be empty

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 09:31:04 +00:00
Matthieu Gallien
84247296d8 automated tests of bulk upload needs to check checksums like real
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-10 09:31:03 +00:00
Jyrki Gadinger
6f5f977534 fix: try to correct mtime on upsyncs
Files with a modification time of less than 0 do usually not make sense
(and afaik the server doesn't accept them either).
--> attempt to update the modification time to _Time.now_ while
propagating

side note: I ran into this because KArchive/Ark(?) didn't consider the
extra time attributes on entries for a certain zip file, so it instead
used the standard time value of each zip entry which was set to <= 1980
for files and < 1970 for directories...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-09 07:13:22 +00:00
Matthieu Gallien
cba3701c5c remove bogus check that tried to check for existing case clash conflict
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-08 19:49:07 +00:00
Matthieu Gallien
58f36dc59e fix crash within FolderStatusModelTest
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 12:40:09 +00:00
Matthieu Gallien
85e31029f7 Qt 6.8 requires macSO 12 or higher: no need to compile against older
clean up preprocessor directives for older macOS releases that are not
supported by macOS minimum required release from the Qt 6.8 release we
require

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-04-07 10:53:37 +00:00
Jyrki Gadinger
cefb1d061e fix(gui): remove ignored file notifications from Activity list
These are informative notifications without any need/possibility to act
on immediately -- if a file is not synced it will be visible from the
shell integration anyway.

An eventual follow-up to this change would be to have a dialogue with an
overview of all files that were ignored (including the entry in the
ignore list that caused a specific file to be ignored).

Closes #6712

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-04-04 13:03:11 +00:00
Pablo Ariño Muñoz
76195b9617 removed redundant qAsConst
Signed-off-by: Pablo Ariño Muñoz <progpabarino@gmail.com>
2025-02-25 03:55:21 +00:00
Pablo Ariño Muñoz
1f426977af Replaced foreach with range loops
Signed-off-by: Pablo Ariño Muñoz <progpabarino@gmail.com>
2025-02-25 03:55:21 +00:00
Matthieu Gallien
5212df870c prevent infinite sync loop: delay retry after many errors
10 seconds for try 3 and 4
30 seconds for try 5 and 6
60 seconds for more

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-20 09:09:56 +00:00
Matthieu Gallien
0fd16d2d4e ensure correct behavioron Windows for invalid file names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:12:37 +00:00
Matthieu Gallien
8deb1c57fc try to enforce the windows compatibility as guessed from server
for now simple rule to guess if the server has windows naming enforced

if windows naming is enforced, we enforce it for new files

if not, we do not care

for now limited to spaces removal

more to come

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:12:37 +00:00
Matthieu Gallien
7a7edd69ef automatic removing of invalid spaces in file names
to ensure compatibility with Widnows, we will remove automatically the
leading space characters in file name of new files or folders

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:12:36 +00:00
Matthieu Gallien
2b17a10457 enforce trailing and leading spaces for new files
enforce trailing and leading space rules for new files and only for new
files but on all platforms, not only windows

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-19 13:12:36 +00:00
Jyrki Gadinger
48c83f4c07 use TextArea instead of TextEdit for share note field
it's already styled properly as it's part of Qt Quick Controls, **and**
it allows for a placeholder text!

also changed the logic for displaying the text field a bit ...

Fixes #7847

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-02-14 13:23:14 +00:00
Matthieu Gallien
9949d0cb20 add test skeleton for OCC::FolderStatusModel
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-12 09:49:09 +01:00
Camila Ayres
f62efca6c4 Improve text returned when checking VFS availability.
- Display more clear error when adding local sync folder and when selecting remote folder.
- Modernize FolderWizardRemotePath::isComplete().
- Display the local folder path when warning that folder is already being synced.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-02-11 09:08:26 +01:00
Matthieu Gallien
ee4bfc5629 disable some parts of the auto tests for end-to-end encryption
those tests are now broken and we think they do not bring much value

for now parts of them will be disabled until we get better automated
tests

realized while doing this that the secure drop tests are not independent
of each other

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Matthieu Gallien
f42c944e6a partial fix for broken automated tests
will use different validation method for hardware stored certificates
and pure software certificates emited by the nextcloud server

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Matthieu Gallien
2a52ec33b0 add support to use PKCS#11 harware token to store certifice for e2ee
Close #5685

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-02-07 09:12:29 +01:00
Integral
356e4f9296 refactor: replace QString() with QStringLiteral() for better performance
Signed-off-by: Integral <integral@member.fsf.org>
2025-01-31 15:11:02 +01:00
Fredrik Eriksson
294bb1adb3 Enable netrc tests
Test for spaces in usernames and passwords is disabled for now as it's
not supported by current implementation.

Signed-off-by: Fredrik Eriksson <feffe@fulh.ax>
2025-01-03 14:46:33 +01:00
Matthieu Gallien
b2b5fb793c ensure no crash due to uncatched exception from std c++ lib
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-01-02 10:20:27 +01:00
Claudio Cambra
60da482b79 Use std::next rather than adding to iterator in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Claudio Cambra
ab51b11ca3 Use QTimeZone in startOfDay for QDate in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Claudio Cambra
271f2eb9b6 Replace aAsConst with std::as_const in tests
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-20 16:26:57 +01:00
Matthieu Gallien
321c583b69 allow dehydrating pinned LNK files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-12-16 16:15:40 +01:00
Camila Ayres
638f3a8647 Update tests for folder check to match fix.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-12-12 12:15:44 +01:00
Claudio Cambra
d921411bd3 Replace dark/light icon roles with a single icon role in activity list model
We can just colour the relevant activity icon from QML based on the
palette text colour

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-12-09 11:11:37 +01:00
Matthieu Gallien
52e78b3ece when locking a file set If-Match header to ensure etag is correct
the file being locked may have been changed sinc the client synced it

so the server side file may have a modified etag. In such cases we do
not want to lock the file and would rather sync the nex server changes
before being able to lock the file

that would ensure that on client side the file being locked is matching
teh state of teh file on server side and would prevent inadvertently
overriding server changes

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-12-09 09:33:49 +01:00
Matthieu Gallien
60b1091e13 fix TestSyncConflictsModel by using locale aware test data
should ensure comparisons of locale aware text is compared against
locale aware test data

will remove portability issues especially on Windows

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
f38c2b7f51 fix local discovery test for file names with spaces on windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
9be169c856 fix regressions in automated tests for bulk upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-29 09:23:58 +01:00
Matthieu Gallien
71281cbd39 prevent out of bounds access in automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-22 11:14:21 +01:00
Matthieu Gallien
4923873ac8 ensure folder permissions are read-only when needed
a folder item must be set read-only if files or sub-folders cannot be
created

a folder item must be set read-write in all other situations

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-11-21 12:06:57 +01:00
Claudio Cambra
9406131e52 Add test for correct handling of live photo mov deletion
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-11-20 14:39:51 +01:00
Claudio Cambra
ed71524aeb Add setIsLivePhoto method to FileInfo
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-11-20 14:39:51 +01:00