Compare commits
811
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f255e85e4b | ||
|
|
cfc921bf31 | ||
|
|
4d96d50d5b | ||
|
|
e57afed9e6 | ||
|
|
f3a5c59e84 | ||
|
|
2c717d9556 | ||
|
|
ae9227d4d4 | ||
|
|
b93854c291 | ||
|
|
e4a5311fc4 | ||
|
|
31545077a3 | ||
|
|
25c5af3b5a | ||
|
|
e592cbb0cd | ||
|
|
4956c990f8 | ||
|
|
5a9f21e32a | ||
|
|
4e4dddc63f | ||
|
|
b410b2fb76 | ||
|
|
737f9fc92f | ||
|
|
1b45bdf5cf | ||
|
|
440b22da68 | ||
|
|
5e0c50d6e0 | ||
|
|
dae2f5319e | ||
|
|
df5c25d59d | ||
|
|
f94f9b3d74 | ||
|
|
cb6f8b9b6b | ||
|
|
5a22bf6727 | ||
|
|
2b49e12caf | ||
|
|
ac67a4a4df | ||
|
|
9b760aa4a5 | ||
|
|
10f006eac8 | ||
|
|
25f1820c54 | ||
|
|
afb4423987 | ||
|
|
aa3897ea38 | ||
|
|
2d16c58f84 | ||
|
|
bba9593676 | ||
|
|
3ccf8032dc | ||
|
|
4835c43082 | ||
|
|
3a7b1940e8 | ||
|
|
d055512f81 | ||
|
|
5606676b80 | ||
|
|
96a17e1ae8 | ||
|
|
635d57a399 | ||
|
|
412e0ee9e8 | ||
|
|
7e2830227c | ||
|
|
0b15a1be9c | ||
|
|
b31060ede8 | ||
|
|
94f0283b6b | ||
|
|
b7a3fd0d07 | ||
|
|
b457bf2a5b | ||
|
|
8b93ad4c5e | ||
|
|
883a319162 | ||
|
|
a7f8611a78 | ||
|
|
0c5da7165e | ||
|
|
be0739e6f1 | ||
|
|
f855c0db5b | ||
|
|
16a54df5d0 | ||
|
|
a309ad5515 | ||
|
|
a2ec733213 | ||
|
|
9feba5f6a3 | ||
|
|
1e9b174919 | ||
|
|
f0d3c0ca33 | ||
|
|
e6c7957abc | ||
|
|
bbdb4252a3 | ||
|
|
1a01f55ce3 | ||
|
|
a4d70cd229 | ||
|
|
e5aebfe028 | ||
|
|
51b9799d26 | ||
|
|
112dd145c9 | ||
|
|
22bcf2ff54 | ||
|
|
66f8a41f62 | ||
|
|
b329099db8 | ||
|
|
0e44d93760 | ||
|
|
783a5c0fab | ||
|
|
aa380fd2a8 | ||
|
|
931ec12e67 | ||
|
|
6ae54a6bd3 | ||
|
|
155440e516 | ||
|
|
a8526fb933 | ||
|
|
f05ab31068 | ||
|
|
9a865b33a0 | ||
|
|
3393948217 | ||
|
|
f89bdf27a9 | ||
|
|
53f4d1c9f6 | ||
|
|
1a957bd5e9 | ||
|
|
d5ed2e13bb | ||
|
|
e057c0d391 | ||
|
|
30e8fceff9 | ||
|
|
08a9444cdf | ||
|
|
a9359c6b6f | ||
|
|
8162621668 | ||
|
|
8d5d146f8d | ||
|
|
9ef33d0a2d | ||
|
|
1e4a6c406e | ||
|
|
8880402d06 | ||
|
|
3e9412e45f | ||
|
|
bef362f265 | ||
|
|
6ac4399c0b | ||
|
|
243ca5d78b | ||
|
|
9b7c453ea2 | ||
|
|
2a26fe6681 | ||
|
|
7e1f9fb2b4 | ||
|
|
f477145555 | ||
|
|
10d9dcbe88 | ||
|
|
5ba22cbbd5 | ||
|
|
01cc7db83a | ||
|
|
260edd431a | ||
|
|
313fda8f88 | ||
|
|
81e2db50e7 | ||
|
|
97e4452432 | ||
|
|
c0c9119213 | ||
|
|
cef9a34d9a | ||
|
|
8ee8580524 | ||
|
|
3518158aef | ||
|
|
488031937e | ||
|
|
4ebf7c62cd | ||
|
|
ea77434de4 | ||
|
|
d2e8b985f0 | ||
|
|
5857c9e685 | ||
|
|
45c8a2ce73 | ||
|
|
e02b01fbc4 | ||
|
|
7a80672a77 | ||
|
|
270297a542 | ||
|
|
c9932455b3 | ||
|
|
28dbfc9b48 | ||
|
|
2e8ac4a73b | ||
|
|
cd9937adfe | ||
|
|
f0ed829192 | ||
|
|
2925d79963 | ||
|
|
93d91435bc | ||
|
|
7ceb420197 | ||
|
|
c2c4eb470d | ||
|
|
8c3f02d007 | ||
|
|
8537e662d6 | ||
|
|
d2679140d8 | ||
|
|
f880881822 | ||
|
|
79381b538b | ||
|
|
265b77c6ce | ||
|
|
dfa6e8acd7 | ||
|
|
8611175fae | ||
|
|
6fceab3f7e | ||
|
|
f968788911 | ||
|
|
12ec32cf41 | ||
|
|
690c671e1d | ||
|
|
6c6882fc65 | ||
|
|
5ce50a957c | ||
|
|
dfbcb3f9db | ||
|
|
7b5a56bb03 | ||
|
|
1ce04ec446 | ||
|
|
854432898f | ||
|
|
b7d7afe302 | ||
|
|
16d0d70e5b | ||
|
|
28eb160954 | ||
|
|
5f24c17952 | ||
|
|
1dcd7333da | ||
|
|
23df7ff059 | ||
|
|
8dc0f993ad | ||
|
|
2fa921bfdb | ||
|
|
35fca3d036 | ||
|
|
df74de9579 | ||
|
|
bcff012a34 | ||
|
|
a79cb9f351 | ||
|
|
7132743722 | ||
|
|
83da9233b6 | ||
|
|
919e52d796 | ||
|
|
36c5ccf5a3 | ||
|
|
a63cdfa19f | ||
|
|
02a542dc8f | ||
|
|
2a66a5f2e5 | ||
|
|
6ecebac4c5 | ||
|
|
6026fa4619 | ||
|
|
96de5eb0a2 | ||
|
|
46e45c3d4d | ||
|
|
aa333af6d6 | ||
|
|
e190b68916 | ||
|
|
cdada2a499 | ||
|
|
3dc628ca8d | ||
|
|
7c802bd416 | ||
|
|
183b834d98 | ||
|
|
4cd3df76da | ||
|
|
82b45b0a1e | ||
|
|
eb6ca92303 | ||
|
|
a559945da2 | ||
|
|
4fee5c55cf | ||
|
|
9437676d23 | ||
|
|
af34391f65 | ||
|
|
688fddb2b4 | ||
|
|
e446a8f5d9 | ||
|
|
f48cec79b8 | ||
|
|
e521f2417c | ||
|
|
39859235a5 | ||
|
|
a1fd2ca220 | ||
|
|
18a686f98c | ||
|
|
96e63ef25d | ||
|
|
d90f2d81ae | ||
|
|
1c12e73337 | ||
|
|
3573668c4e | ||
|
|
aec50ec0d7 | ||
|
|
1e672b17f5 | ||
|
|
f8fb1f2fa2 | ||
|
|
4373733df7 | ||
|
|
ccd0ee5d72 | ||
|
|
ac7ec77689 | ||
|
|
477d971b29 | ||
|
|
4c5a0bf0a4 | ||
|
|
d05375a9c7 | ||
|
|
6bf6e76bf1 | ||
|
|
6de01ecf1a | ||
|
|
c2ede80ff0 | ||
|
|
6fc9b5baf2 | ||
|
|
c73a2a0b91 | ||
|
|
2bf493a313 | ||
|
|
f1fe196b8c | ||
|
|
6f73fc5f6f | ||
|
|
73631ec8a6 | ||
|
|
975030e25f | ||
|
|
715971581d | ||
|
|
84bcbd4cc9 | ||
|
|
33870377ae | ||
|
|
0ddffbbea9 | ||
|
|
9d6aff9a6d | ||
|
|
6259d473ea | ||
|
|
984416cc44 | ||
|
|
b1d0c2becd | ||
|
|
e0ab114a78 | ||
|
|
cbd3a409fd | ||
|
|
4f85ff3cec | ||
|
|
8169861cae | ||
|
|
71d06dccd8 | ||
|
|
8e08bdb122 | ||
|
|
a22baedc16 | ||
|
|
4520491820 | ||
|
|
03572c7f62 | ||
|
|
b3a4bc223a | ||
|
|
29ce1c9e99 | ||
|
|
0825493921 | ||
|
|
d6dd74d95f | ||
|
|
0fafd55821 | ||
|
|
832d31b627 | ||
|
|
3d473d9776 | ||
|
|
ca3983e04d | ||
|
|
e018b80444 | ||
|
|
541fa5e51c | ||
|
|
288de0420a | ||
|
|
cda33497e2 | ||
|
|
fa76fc2754 | ||
|
|
2f90fef8e6 | ||
|
|
531982df08 | ||
|
|
6e8f46a616 | ||
|
|
b51c73e6f7 | ||
|
|
c58771a08d | ||
|
|
8ddd607cf6 | ||
|
|
04d5758115 | ||
|
|
b0615d143f | ||
|
|
ed64930e7e | ||
|
|
d130f740ac | ||
|
|
7add88c8b9 | ||
|
|
3b6a44a9b3 | ||
|
|
62e0bb6bf9 | ||
|
|
70219bb639 | ||
|
|
16fcdbd398 | ||
|
|
bcef379633 | ||
|
|
d6c7e9c402 | ||
|
|
e0ded6131a | ||
|
|
a939b3d0ae | ||
|
|
7cb5902d51 | ||
|
|
3a61679531 | ||
|
|
73ca397f9e | ||
|
|
bdc41ee3c8 | ||
|
|
63a23712c1 | ||
|
|
c9d97d2192 | ||
|
|
ad4bec55cb | ||
|
|
a8329a8329 | ||
|
|
5b6c664538 | ||
|
|
6d079664ed | ||
|
|
274aadb0ff | ||
|
|
96760d10d4 | ||
|
|
2599e0bf8d | ||
|
|
7786703d4c | ||
|
|
2b12f25221 | ||
|
|
1ebfe40013 | ||
|
|
7b4ce962ec | ||
|
|
650d5dd182 | ||
|
|
452955422a | ||
|
|
bcc46f7ae7 | ||
|
|
4bbf161151 | ||
|
|
e9bb9d5d42 | ||
|
|
ad42b6cd4c | ||
|
|
36aa6e432d | ||
|
|
211ec3da25 | ||
|
|
2efe0d7247 | ||
|
|
688fdea470 | ||
|
|
2821fe90e5 | ||
|
|
b8912a0224 | ||
|
|
91a37020a9 | ||
|
|
4ea3834df1 | ||
|
|
8da1474279 | ||
|
|
0d577ec6b7 | ||
|
|
4e4e2d182d | ||
|
|
5fc0d91297 | ||
|
|
4a1e7a8223 | ||
|
|
e0e6fdcbcc | ||
|
|
1fed1f5f2f | ||
|
|
3d516d0eab | ||
|
|
b4050dd064 | ||
|
|
af0ddce6dc | ||
|
|
19989c09ee | ||
|
|
28d1186cdc | ||
|
|
ba538498b3 | ||
|
|
0f04e2fec1 | ||
|
|
2b28c35522 | ||
|
|
9d2e4a4777 | ||
|
|
5835e58471 | ||
|
|
6ec3e0b6ad | ||
|
|
98e6d4a660 | ||
|
|
2ab8907369 | ||
|
|
b5f872c3e3 | ||
|
|
febeae7674 | ||
|
|
44737c27eb | ||
|
|
f4a0ae095e | ||
|
|
6e6713367d | ||
|
|
08b8441c6e | ||
|
|
aa8ee87e34 | ||
|
|
af91398346 | ||
|
|
03f654e5eb | ||
|
|
cc5313648c | ||
|
|
81132d47be | ||
|
|
7fa65aed9d | ||
|
|
a23d55c926 | ||
|
|
776aa3b664 | ||
|
|
65b495c4fb | ||
|
|
42e262101f | ||
|
|
5c655f9b9c | ||
|
|
9ddf9a9604 | ||
|
|
31ce3c656c | ||
|
|
65711ffdfe | ||
|
|
aee38c95f2 | ||
|
|
7da42ea18b | ||
|
|
f079809fcc | ||
|
|
bd2681193c | ||
|
|
5055086f16 | ||
|
|
78bd8ba61a | ||
|
|
01344144e7 | ||
|
|
51a52f051c | ||
|
|
f32a12f26a | ||
|
|
3d7474b2e6 | ||
|
|
54549a00be | ||
|
|
3b4ede2d81 | ||
|
|
3a5bb79386 | ||
|
|
e82b817cb7 | ||
|
|
1ceb30e621 | ||
|
|
c80f1f389b | ||
|
|
b716c74d97 | ||
|
|
671412cc47 | ||
|
|
908a0dda0e | ||
|
|
cef0c69d29 | ||
|
|
1048746b95 | ||
|
|
1d76e45a13 | ||
|
|
f81404b43d | ||
|
|
f536eee932 | ||
|
|
13d40d696a | ||
|
|
6a4885a334 | ||
|
|
39abf4855f | ||
|
|
f7c9d882a7 | ||
|
|
b434283998 | ||
|
|
1b328b50a2 | ||
|
|
f4775b7e2c | ||
|
|
ba388474fd | ||
|
|
b62f0154dd | ||
|
|
f925ba469b | ||
|
|
5b65d106c8 | ||
|
|
0a06757693 | ||
|
|
8d416a6205 | ||
|
|
ac26ffdc45 | ||
|
|
2f700545a8 | ||
|
|
58299f630d | ||
|
|
f85607c355 | ||
|
|
f6ce330d03 | ||
|
|
710ad4b3d2 | ||
|
|
f094cd8bc9 | ||
|
|
bf7bb83a56 | ||
|
|
fe2618adb3 | ||
|
|
25e0726cd3 | ||
|
|
2807326f6c | ||
|
|
41fcf0c648 | ||
|
|
26449e24c7 | ||
|
|
201e6b3d37 | ||
|
|
3ba783e099 | ||
|
|
2eca9791f7 | ||
|
|
cb17d792d0 | ||
|
|
f57d9fcd1f | ||
|
|
239c4e02ae | ||
|
|
2dba050852 | ||
|
|
27424fa517 | ||
|
|
abe4481956 | ||
|
|
2d2377e5ba | ||
|
|
ebeb5f0705 | ||
|
|
4bccad2714 | ||
|
|
36c63b8a0c | ||
|
|
5c6f59c7cf | ||
|
|
f779a6c2d9 | ||
|
|
c33328e6ef | ||
|
|
f142e66e7d | ||
|
|
6089dd0946 | ||
|
|
e3c8b64e9c | ||
|
|
2c237ea3b0 | ||
|
|
504fb1863b | ||
|
|
f6616ecb38 | ||
|
|
a6a541ff5e | ||
|
|
0a91cb51b7 | ||
|
|
9121a07a10 | ||
|
|
d8c62d4ff9 | ||
|
|
84ed04ad96 | ||
|
|
530f2e607e | ||
|
|
8c278c1171 | ||
|
|
dfcd7f4311 | ||
|
|
d8d06f2546 | ||
|
|
09f41024a8 | ||
|
|
1c88f94dbc | ||
|
|
177d4c06d8 | ||
|
|
1899ca7ed1 | ||
|
|
ee02b00710 | ||
|
|
04dea791bb | ||
|
|
650144fdcc | ||
|
|
4f130835a8 | ||
|
|
2d9aa7fa96 | ||
|
|
f856950058 | ||
|
|
616c1c84e7 | ||
|
|
4e035ceed4 | ||
|
|
17271d8ad2 | ||
|
|
ba809dc646 | ||
|
|
7ab30f08d5 | ||
|
|
2b2d4c18d9 | ||
|
|
f92f514046 | ||
|
|
fc145e1e22 | ||
|
|
329e4ff23f | ||
|
|
f3e90cf07c | ||
|
|
bf9ada5efe | ||
|
|
fa10867938 | ||
|
|
8c86b6a92b | ||
|
|
6e7d615a71 | ||
|
|
8595e4cf8d | ||
|
|
37eca1a5d5 | ||
|
|
562e799d94 | ||
|
|
ae89d1616d | ||
|
|
cea31587ba | ||
|
|
3b90fb18d2 | ||
|
|
a66f4d640e | ||
|
|
3c52e2cef1 | ||
|
|
d818169785 | ||
|
|
3dfb266d73 | ||
|
|
6667a9987e | ||
|
|
faec92aff6 | ||
|
|
945bf3b098 | ||
|
|
73cf745aa3 | ||
|
|
bb4c135bc3 | ||
|
|
a7cd586a0f | ||
|
|
328102d660 | ||
|
|
4d94b8164a | ||
|
|
8a1fc07362 | ||
|
|
6d193c3fb0 | ||
|
|
2928d18aa6 | ||
|
|
10079e53e4 | ||
|
|
057a8938b3 | ||
|
|
f49ebb29e1 | ||
|
|
fa67776a18 | ||
|
|
f9c69cc96e | ||
|
|
624b0ab7a0 | ||
|
|
b6e98972a7 | ||
|
|
7109bf2016 | ||
|
|
1e5ad690d2 | ||
|
|
4e58422797 | ||
|
|
d2037fa81a | ||
|
|
7f4a56c8e2 | ||
|
|
ae88b69489 | ||
|
|
6491900c1e | ||
|
|
e9744a88c5 | ||
|
|
191f1fb9cc | ||
|
|
e0fe3d0eca | ||
|
|
ab724ab84d | ||
|
|
a1d185040b | ||
|
|
3152e355d4 | ||
|
|
b56e48525a | ||
|
|
c85964ae79 | ||
|
|
ca0edea70c | ||
|
|
61e3f48875 | ||
|
|
d62f966042 | ||
|
|
6707e04d5c | ||
|
|
bf9d6cf9c0 | ||
|
|
699380e546 | ||
|
|
e37b4e98e9 | ||
|
|
75820ac66f | ||
|
|
8b7dc1c512 | ||
|
|
cbbb4ebeff | ||
|
|
5149c5ee99 | ||
|
|
f521a020c0 | ||
|
|
99bd48144b | ||
|
|
e46acb004a | ||
|
|
5f9756987d | ||
|
|
ac7d90ae61 | ||
|
|
f210498da7 | ||
|
|
df58beff81 | ||
|
|
867f54d6df | ||
|
|
2f1ea4998a | ||
|
|
c1ed915a3e | ||
|
|
4eb3b80187 | ||
|
|
d0003f828d | ||
|
|
aba9f9e7d7 | ||
|
|
bbd0ab14f0 | ||
|
|
721ce87815 | ||
|
|
e616228f5d | ||
|
|
c6ca05e60a | ||
|
|
f96bab9d8a | ||
|
|
ba19d09a1f | ||
|
|
d2d8665618 | ||
|
|
4d5f489906 | ||
|
|
1c62ab6504 | ||
|
|
a1d9236bcb | ||
|
|
4c1bce28dd | ||
|
|
97cca77b03 | ||
|
|
26f50d4249 | ||
|
|
e76adc59f7 | ||
|
|
e2f13c41ba | ||
|
|
fe7069a75d | ||
|
|
8bb48c3eb3 | ||
|
|
b40f282507 | ||
|
|
3ab3403bc4 | ||
|
|
0042993048 | ||
|
|
965f47c5f3 | ||
|
|
7dacbad823 | ||
|
|
dfbf33c072 | ||
|
|
5c69a91e76 | ||
|
|
ea84cbd11e | ||
|
|
9b290b501a | ||
|
|
031bf94b1f | ||
|
|
7952523f9c | ||
|
|
b2bd4e18bb | ||
|
|
8394fb4e8c | ||
|
|
e4ed03920c | ||
|
|
5924657401 | ||
|
|
8c8f9bb202 | ||
|
|
a3b4dbef2b | ||
|
|
4dbfd81e40 | ||
|
|
520fe50570 | ||
|
|
2095158812 | ||
|
|
3e8145e0f6 | ||
|
|
4428aefe07 | ||
|
|
c346baad1c | ||
|
|
a76fc19fde | ||
|
|
488e06e7bc | ||
|
|
96f1b2160c | ||
|
|
02e1dd48e5 | ||
|
|
968a68c233 | ||
|
|
984fa523b1 | ||
|
|
001ac54c8c | ||
|
|
60ef31a6e3 | ||
|
|
b875b38621 | ||
|
|
2372d49f58 | ||
|
|
c9bd89fc91 | ||
|
|
b2c4e65dea | ||
|
|
bd08ecf71e | ||
|
|
f773600116 | ||
|
|
5a7b13f7f5 | ||
|
|
e89f3a102f | ||
|
|
937317eac7 | ||
|
|
d9d81f9876 | ||
|
|
2cbf1ea3e4 | ||
|
|
d085e852c9 | ||
|
|
dc9727a4d0 | ||
|
|
fb0c84fa5c | ||
|
|
c7ab099a83 | ||
|
|
9dd072e065 | ||
|
|
a11199eecb | ||
|
|
32d0e2b872 | ||
|
|
7c008036c4 | ||
|
|
dcfb3eb89a | ||
|
|
a9a1882f8f | ||
|
|
3bdcc9601d | ||
|
|
0b9eff4147 | ||
|
|
5fcc77218e | ||
|
|
040fe7928a | ||
|
|
ad8186cff5 | ||
|
|
0da5f6fbb7 | ||
|
|
24bca0679f | ||
|
|
b6ffc7abc9 | ||
|
|
ac55059484 | ||
|
|
566b580891 | ||
|
|
f62c7e459d | ||
|
|
a33576e60d | ||
|
|
f4c64f2958 | ||
|
|
f926523142 | ||
|
|
83b49e92c8 | ||
|
|
9683acd4f7 | ||
|
|
d4fd2afa5a | ||
|
|
1a7a0b872e | ||
|
|
cc671f4723 | ||
|
|
3873ef4f32 | ||
|
|
fa0ebc2223 | ||
|
|
40a2906aee | ||
|
|
6f0e77fa81 | ||
|
|
ff56b3ed5b | ||
|
|
ef46fbaeff | ||
|
|
7dc7320290 | ||
|
|
4813c6cc1e | ||
|
|
4301bf78e7 | ||
|
|
d7d0d6445a | ||
|
|
e8616d35aa | ||
|
|
e2edc30707 | ||
|
|
e9f921fd1d | ||
|
|
e2fa5b8e2c | ||
|
|
28ff801e14 | ||
|
|
d4d85fb643 | ||
|
|
1ed41852df | ||
|
|
1a889262b3 | ||
|
|
198f3b8fb9 | ||
|
|
1bad173ae0 | ||
|
|
5de316f1f6 | ||
|
|
abb2efb327 | ||
|
|
25911dcdab | ||
|
|
1de358fd63 | ||
|
|
7f44e91d97 | ||
|
|
8a5ded985e | ||
|
|
b808845bfd | ||
|
|
0a881d93a3 | ||
|
|
e2c8abb337 | ||
|
|
6ef09e7a46 | ||
|
|
5d64df1e9d | ||
|
|
b1ca702cfc | ||
|
|
97b4e3a713 | ||
|
|
eec857dc8f | ||
|
|
fd2d22f355 | ||
|
|
fc68b4e5a3 | ||
|
|
cdbb253fb7 | ||
|
|
3a7eba2ace | ||
|
|
bf9d493134 | ||
|
|
e3e1567649 | ||
|
|
698518e81f | ||
|
|
c75c1ec52b | ||
|
|
0b8d43d32d | ||
|
|
f22b53a2aa | ||
|
|
c102588eda | ||
|
|
d5ab54ac91 | ||
|
|
4f1ec0b6a6 | ||
|
|
1ea761df0e | ||
|
|
9f53c14f8d | ||
|
|
fe2c76dd90 | ||
|
|
6ba97c7e9d | ||
|
|
6561a86e46 | ||
|
|
16486bf7b3 | ||
|
|
66ce69e2ac | ||
|
|
4917913178 | ||
|
|
6d88aa1b1f | ||
|
|
da3f26206b | ||
|
|
98ab726e48 | ||
|
|
1c6177ca5e | ||
|
|
b7a22a793f | ||
|
|
f8bf7ef1ff | ||
|
|
bdeb1e32e2 | ||
|
|
addce5c327 | ||
|
|
38c6431195 | ||
|
|
b59b7374de | ||
|
|
0dbbaed665 | ||
|
|
4b60a85d9d | ||
|
|
507785acac | ||
|
|
1ade587016 | ||
|
|
054474c036 | ||
|
|
2eedb40871 | ||
|
|
1a11a9dfd8 | ||
|
|
a33064e0e6 | ||
|
|
24c844d113 | ||
|
|
a31e0022ff | ||
|
|
69cc9ea479 | ||
|
|
9ed879933c | ||
|
|
f28c5bcfa7 | ||
|
|
8f71e573fd | ||
|
|
4fd106a38b | ||
|
|
5d85d8afa1 | ||
|
|
724b01b8c7 | ||
|
|
f3b30bfe13 | ||
|
|
4a501f38ef | ||
|
|
f1000ea3b2 | ||
|
|
4e4a160cd4 | ||
|
|
40329f0b60 | ||
|
|
3ed435ad9d | ||
|
|
af5c814d6e | ||
|
|
950ca33d15 | ||
|
|
a01d24d8f4 | ||
|
|
4dc1b99ca7 | ||
|
|
1f49f18efc | ||
|
|
2c0ed79db4 | ||
|
|
ea62da916a | ||
|
|
e11fe7f7e3 | ||
|
|
76902d2aa8 | ||
|
|
1bfb2e2c17 | ||
|
|
86f66cd7ae | ||
|
|
48bea3c86e | ||
|
|
2abbc3ec53 | ||
|
|
a3333b99b2 | ||
|
|
7e3451077d | ||
|
|
157192e208 | ||
|
|
e609e0b48e | ||
|
|
9dcefff0ca | ||
|
|
e7e15b6f96 | ||
|
|
b513b436bb | ||
|
|
70ba60c38b | ||
|
|
ea61c8f812 | ||
|
|
97260f10ad | ||
|
|
1d497c82f1 | ||
|
|
483559fe29 | ||
|
|
fcb75e3be8 | ||
|
|
bb61a4f31c | ||
|
|
a8a5c43a81 | ||
|
|
4bfbd9c066 | ||
|
|
151dc37398 | ||
|
|
cc6661a0f8 | ||
|
|
c52ae6f124 | ||
|
|
4c7d4d1c91 | ||
|
|
737bfbf4ad | ||
|
|
05cf811a30 | ||
|
|
82478f5fb5 | ||
|
|
2dd0acbc64 | ||
|
|
7ac934e792 | ||
|
|
9f9a5c187f | ||
|
|
4ec2df4617 | ||
|
|
199fc85f7f | ||
|
|
1b24c57ca2 | ||
|
|
cbd92baa8b | ||
|
|
2e10ec59f7 | ||
|
|
288c4521e4 | ||
|
|
c9ba81660d | ||
|
|
f394d03bf9 | ||
|
|
f28695e30b | ||
|
|
06647d2f86 | ||
|
|
e2f43cf440 | ||
|
|
dabb8468a6 | ||
|
|
43ff0718bb | ||
|
|
836a039b4e | ||
|
|
2df32180e9 | ||
|
|
564f827f05 | ||
|
|
21f6d0d1fb | ||
|
|
ebcc4c54d3 | ||
|
|
e521c955f2 | ||
|
|
a114b43f66 | ||
|
|
2938a7f8f6 | ||
|
|
934b795367 | ||
|
|
275220d89e | ||
|
|
9782f193c6 | ||
|
|
f17a4e3909 | ||
|
|
0a466fa4b1 | ||
|
|
7aa9dcb217 | ||
|
|
e5a7b889e6 | ||
|
|
47d1583d83 | ||
|
|
044fda9361 | ||
|
|
c5b0d0f15d | ||
|
|
997c245cea | ||
|
|
ace48c8a55 | ||
|
|
4bdc400676 | ||
|
|
cb54982b89 | ||
|
|
ae77a5eb52 | ||
|
|
590321e835 | ||
|
|
c037f0454a | ||
|
|
4d9a512ac0 | ||
|
|
d131b4b9de | ||
|
|
e73ce9f91d | ||
|
|
7427f62eac | ||
|
|
cd0ea5e172 | ||
|
|
3ac78fe86a | ||
|
|
7d907fd828 | ||
|
|
617c600717 | ||
|
|
7f8a280ce1 | ||
|
|
7f834c9ba8 | ||
|
|
bb052f8688 | ||
|
|
f186d2621a | ||
|
|
285fa05a18 | ||
|
|
b3853da16a | ||
|
|
74fd39eff8 | ||
|
|
72ad6876e2 | ||
|
|
9f51730c61 | ||
|
|
c13386da02 | ||
|
|
c4eea09777 | ||
|
|
6639e18bcf | ||
|
|
9c31e2da98 | ||
|
|
a1633772f5 | ||
|
|
8eaabbd2ee | ||
|
|
9273b77f25 | ||
|
|
99422ab768 | ||
|
|
0c5255c412 | ||
|
|
58bb6bf72c | ||
|
|
f629874119 | ||
|
|
9fc60d72f4 | ||
|
|
baafaa7aa2 | ||
|
|
fcbceba4fa | ||
|
|
f4b9d40e6d | ||
|
|
926ad6a005 | ||
|
|
e407936492 | ||
|
|
614ce48fbc | ||
|
|
c35c319b29 | ||
|
|
82265353b3 | ||
|
|
b86349d0f0 | ||
|
|
b31eeb6c3f | ||
|
|
17f34c920f | ||
|
|
17c696996c | ||
|
|
9b014d5df6 | ||
|
|
0318a59141 | ||
|
|
6802d92426 | ||
|
|
a5426a8559 | ||
|
|
ced3d9076b | ||
|
|
2debdd6f50 | ||
|
|
1d1c75af41 | ||
|
|
d87f0c7534 | ||
|
|
d1ebe33f46 | ||
|
|
9f0f4f848e | ||
|
|
bea0aa2b0c |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
exclude_paths:
|
||||
- "app/src/main/cpp/**"
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:noble@sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9
|
||||
FROM ubuntu:resolute@sha256:f3d28607ddd78734bb7f71f117f3c6706c666b8b76cbff7c9ff6e5718d46ff64
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV ANDROID_HOME=/usr/lib/android-sdk
|
||||
@@ -16,5 +16,4 @@ RUN mkdir -p "$HOME/.gradle" && \
|
||||
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties" && \
|
||||
echo "org.gradle.caching=true" >> "$HOME/.gradle/gradle.properties" && \
|
||||
echo "org.gradle.parallel=true" >> "$HOME/.gradle/gradle.properties" && \
|
||||
echo "org.gradle.configureondemand=true" >> "$HOME/.gradle/gradle.properties" && \
|
||||
echo "kapt.incremental.apt=true" >> "$HOME/.gradle/gradle.properties"
|
||||
echo "org.gradle.configureondemand=true" >> "$HOME/.gradle/gradle.properties"
|
||||
+3
-1
@@ -22,6 +22,7 @@ steps:
|
||||
from_secret: GIT_TOKEN
|
||||
commands:
|
||||
- scripts/checkIfRunDrone.sh $DRONE_PULL_REQUEST || exit 0
|
||||
- sdkmanager "cmake;4.1.2"
|
||||
- emulator -avd android -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &
|
||||
- sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g app/src/main/res/values/setup.xml
|
||||
- ./gradlew assembleGplayDebugAndroidTest
|
||||
@@ -88,6 +89,7 @@ steps:
|
||||
from_secret: GIT_TOKEN
|
||||
commands:
|
||||
- scripts/checkIfRunDrone.sh $DRONE_PULL_REQUEST || exit 0
|
||||
- sdkmanager "cmake;4.1.2"
|
||||
- emulator -avd android -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &
|
||||
- sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g app/src/main/res/values/setup.xml
|
||||
- scripts/runCombinedTest.sh $DRONE_PULL_REQUEST $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER
|
||||
@@ -187,6 +189,6 @@ name: GIT_TOKEN
|
||||
data: XIoa9IYq+xQ+N5iln8dlpWv0jV6ROr7HuE24ioUr4uQ8m8SjyH0yognWYLYLqnbTKrFWlFZiEMQTH/sZiWjRFvV1iL0=
|
||||
---
|
||||
kind: signature
|
||||
hmac: de23b70b660e9f78e936d89699fd24777a83c8caaad97d086bbc0c8a0373aa91
|
||||
hmac: e8d113e2208bae860dd54f60386114ba6841cc5de4e4d6e4606fda82d99103e0
|
||||
|
||||
...
|
||||
@@ -16,4 +16,11 @@ B | A
|
||||
|
||||
### 🏁 Checklist
|
||||
|
||||
- [ ] Tests written, or not not needed
|
||||
- [ ] ⛑️ Tests (unit and/or integration) are included or not needed
|
||||
- [ ] 🔙 Backport requests are created or not needed: `/backport to stable-xx.x`
|
||||
- [ ] 📅 Milestone is set
|
||||
- [ ] 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)
|
||||
|
||||
## 🤖 AI (if applicable)
|
||||
|
||||
- [ ] The content of this PR was partly or fully generated using AI
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
echo "repo=${{ github.event.pull_request.head.repo.full_name }}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
repository: ${{ steps.get-vars.outputs.repo }}
|
||||
@@ -72,6 +72,5 @@ jobs:
|
||||
{
|
||||
echo "org.gradle.jvmargs=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
|
||||
echo "org.gradle.configureondemand=true"
|
||||
echo "kapt.incremental.apt=true"
|
||||
} > "$HOME/.gradle/gradle.properties"
|
||||
scripts/analysis/analysis-wrapper.sh "${{ steps.get-vars.outputs.branch }}" "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" "$GITHUB_RUN_NUMBER" "${{ steps.get-vars.outputs.pr }}"
|
||||
@@ -22,18 +22,17 @@ jobs:
|
||||
matrix:
|
||||
flavor: [ Generic, Gplay, Huawei ]
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: set up JDK 21
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: 21
|
||||
- uses: gradle/actions/wrapper-validation@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
|
||||
- uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
- name: Build ${{ matrix.flavor }}
|
||||
run: |
|
||||
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties
|
||||
echo "org.gradle.caching=true" >> gradle.properties
|
||||
echo "org.gradle.parallel=true" >> gradle.properties
|
||||
echo "org.gradle.configureondemand=true" >> gradle.properties
|
||||
echo "kapt.incremental.apt=true" >> gradle.properties
|
||||
./gradlew assemble${{ matrix.flavor }}
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
matrix:
|
||||
task: [ detekt, spotlessKotlinCheck, lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
language: [ 'java' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set Swap Space
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
|
||||
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Set up JDK 21
|
||||
@@ -57,4 +57,4 @@ jobs:
|
||||
echo "org.gradle.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
|
||||
./gradlew --no-daemon assembleDebug
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
|
||||
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
id: check-secrets
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
|
||||
with:
|
||||
persist-credentials: false
|
||||
@@ -47,11 +47,39 @@ jobs:
|
||||
run: |
|
||||
mkdir -p "$HOME/.gradle"
|
||||
echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties"
|
||||
echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true; kapt.incremental.apt=true" >> "$HOME/.gradle/gradle.properties"
|
||||
echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true" >> "$HOME/.gradle/gradle.properties"
|
||||
[ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle"
|
||||
[ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle"
|
||||
[ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode = ${{github.event.number}} /" "app/build.gradle.kts"
|
||||
[ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionName .*/versionName = \"${{github.event.number}}\"/" "app/build.gradle.kts"
|
||||
./gradlew assembleQaDebug
|
||||
$(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk
|
||||
.github/workflows/uploadArtifact.sh "$LOG_USERNAME" "$LOG_PASSWORD" "${{github.event.number}}" "${{github.event.number}}" "$GITHUB_TOKEN"
|
||||
|
||||
- name: Upload APK
|
||||
id: upload-apk
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
||||
with:
|
||||
path: app/build/outputs/apk/qa/debug/*qa-debug*.apk
|
||||
retention-days: 7
|
||||
archive: false
|
||||
|
||||
- name: Create QR Code
|
||||
run: |
|
||||
sudo apt-get -y install qrencode
|
||||
qrencode -o qr.png "${{ steps.upload-apk.outputs.artifact-url }}"
|
||||
|
||||
- name: Upload QR
|
||||
id: upload-qr
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
||||
with:
|
||||
path: qr.png
|
||||
retention-days: 7
|
||||
archive: false
|
||||
|
||||
- name: Comment PR
|
||||
uses: thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa
|
||||
with:
|
||||
message: |
|
||||
APK file: ${{ steps.upload-apk.outputs.artifact-url }}
|
||||
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
|
||||
 (please click on link to get QR code displayed)
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest-low
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
@@ -42,6 +42,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
|
||||
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -1,110 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
name: "Screenshot Test"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: screenshot-test-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
screenshot:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
scheme: [ Light ]
|
||||
color: [ blue ]
|
||||
api-level: [ 28 ]
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
- name: AVD cache
|
||||
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
id: avd-cache
|
||||
with:
|
||||
path: |
|
||||
~/.android/avd/*
|
||||
~/.android/adb*
|
||||
key: avd-${{ matrix.api-level }}
|
||||
|
||||
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: 21
|
||||
|
||||
- name: Enable KVM group perms
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
- name: create AVD and generate snapshot for caching
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
force-avd-creation: false
|
||||
arch: x86
|
||||
sdcard-path-or-size: 100M
|
||||
target: google_apis
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
|
||||
script: echo "Generated AVD snapshot for caching."
|
||||
|
||||
- name: Configure gradle daemon
|
||||
run: |
|
||||
mkdir -p $HOME/.gradle
|
||||
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > $HOME/.gradle/gradle.properties
|
||||
echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties
|
||||
echo "org.gradle.parallel=true" >> $HOME/.gradle/gradle.properties
|
||||
echo "org.gradle.configureondemand=true" >> $HOME/.gradle/gradle.properties
|
||||
echo "kapt.incremental.apt=true" >> $HOME/.gradle/gradle.properties
|
||||
|
||||
- name: Build generic flavor
|
||||
run: ./gradlew assembleGenericDebug
|
||||
|
||||
- name: Delete old comments
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ always() }}
|
||||
run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}}
|
||||
|
||||
- name: Run screenshot tests
|
||||
env:
|
||||
SHOT_TEST: "true"
|
||||
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0
|
||||
with:
|
||||
api-level: ${{ matrix.api-level }}
|
||||
force-avd-creation: false
|
||||
arch: x86
|
||||
sdcard-path-or-size: 100M
|
||||
target: google_apis
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
|
||||
script: ./gradlew uninstallAll genericDebugExecuteScreenshotTests -Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }}
|
||||
- name: upload failing results
|
||||
if: ${{ failure() }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}}
|
||||
- name: Archive Espresso results
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: Report-${{ matrix.color }}-${{ matrix.scheme }}
|
||||
path: app/build/reports
|
||||
retention-days: 4
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
||||
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
|
||||
with:
|
||||
days-before-stale: 28
|
||||
days-before-close: 14
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}}
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
|
||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
||||
|
||||
- name: Run unit tests with coverage
|
||||
run: ./gradlew jacocoTestGplayDebugUnitTest
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "test" "Unit" ${{github.event.number}}
|
||||
|
||||
- name: Upload coverage to codecov
|
||||
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
|
||||
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: unit
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
|
||||
- name: Upload jacoco artifacts
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: test-results
|
||||
path: app/build/reports/jacoco/jacocoTestGplayDebugUnitTestReport/html/
|
||||
+37
@@ -22,9 +22,32 @@ target/
|
||||
local.properties
|
||||
tests/local.properties
|
||||
|
||||
# Signing & secrets
|
||||
*.jks
|
||||
*.keystore
|
||||
keystore.properties
|
||||
release.properties
|
||||
google-services.json
|
||||
GoogleService-Info.plist
|
||||
*.p12
|
||||
*.pem
|
||||
secrets.properties
|
||||
.env
|
||||
.env.*
|
||||
|
||||
# Windows
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
|
||||
# Mac .DS_Store files
|
||||
.DS_Store
|
||||
|
||||
# Linux/editor temp files
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
.vscode/
|
||||
|
||||
# Proguard README
|
||||
proguard-project.txt
|
||||
tests/proguard-project.txt
|
||||
@@ -39,6 +62,20 @@ build
|
||||
fastlane/Fastfile
|
||||
*.hprof
|
||||
|
||||
# NDK / C++
|
||||
*.so
|
||||
obj/
|
||||
*.o
|
||||
*.a
|
||||
.cxx/
|
||||
|
||||
# Testing & coverage
|
||||
.kotlin/
|
||||
*.lcov
|
||||
test-results/
|
||||
jacoco/
|
||||
*.exec
|
||||
|
||||
# fastlane specific
|
||||
**/fastlane/report.xml
|
||||
|
||||
|
||||
@@ -1,53 +1,190 @@
|
||||
<!--
|
||||
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||
- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
# Agents.md
|
||||
|
||||
You are an experienced engineer specialized on Java, Kotlin and familiar with the platform-specific details of Android.
|
||||
|
||||
## Your Role
|
||||
|
||||
- You implement features and fix bugs.
|
||||
- Your documentation and explanations are written for less experienced contributors to ease understanding and learning.
|
||||
- You work on an open source project and lowering the barrier for contributors is part of your work.
|
||||
|
||||
## Project Overview
|
||||
|
||||
The Nextcloud Android Client is a application to synchronize files from Nextcloud Server with your Android device.
|
||||
Java, Kotlin, XML, Jetpack Compose are the key technologies used for building the app.
|
||||
|
||||
## Project Structure: AI Agent Handling Guidelines
|
||||
|
||||
'./app/src/main/java/com' main package of the project.
|
||||
'.app/src/main/java/com/nextcloud/utils/extensions' package used for creating extensions.
|
||||
|
||||
## General Guidance
|
||||
|
||||
Every new file needs to get a SPDX header in the first rows according to this template.
|
||||
The year in the first line must be replaced with the year when the file is created (for example, 2026 for files first added in 2026).
|
||||
The commenting signs need to be used depending on the file type.
|
||||
|
||||
```plaintext
|
||||
SPDX-FileCopyrightText: <YEAR> Nextcloud GmbH and Nextcloud contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
```
|
||||
|
||||
Avoid creating source files that implement multiple types; instead, place each type in its own dedicated source file.
|
||||
|
||||
## Commit and Pull Request Guidelines
|
||||
|
||||
- **Commits**: Follow Conventional Commits format. Use `feat: ...`, `fix: ...`, or `refactor: ...` as appropriate in the commit message prefix.
|
||||
- Include a short summary of what changed. *Example:* `fix: prevent crash on empty todo title`.
|
||||
- **Pull Request**: When the agent creates a PR, it should include a description summarizing the changes and why they were made. If a GitHub issue exists, reference it (e.g., “Closes #123”).
|
||||
|
||||
### Code Style
|
||||
|
||||
- Do not exceed 300 line of code per file.
|
||||
- Do not add comments, documentation for every function you created instead make it self explanatory as much as possible.
|
||||
- Create models, states in different files instead of doing it one single file.
|
||||
- Do not use magic number.
|
||||
- Apply fail fast principle instead of using nested if-else statements.
|
||||
- Do not use multiple boolean flags to determine states instead use enums or sealed classes.
|
||||
- Use modern Java for Java classes. Optionals, virtual threads, records, streams if necessary.
|
||||
|
||||
<!--
|
||||
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||
- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
# Agents.md
|
||||
|
||||
This file provides guidance to all AI agents (Claude, Codex, Gemini, etc.) working with code in this repository.
|
||||
|
||||
You are an experienced engineer specialized on Java, Kotlin and familiar with the platform-specific details of Android.
|
||||
|
||||
## Your Role
|
||||
|
||||
- You implement features and fix bugs.
|
||||
- Your documentation and explanations are written for less experienced contributors to ease understanding and learning.
|
||||
- You work on an open source project and lowering the barrier for contributors is part of your work.
|
||||
|
||||
## Project Overview
|
||||
|
||||
The Nextcloud Android Client is a application to synchronize files from Nextcloud Server with your Android device.
|
||||
Java, Kotlin, XML, Jetpack Compose are the key technologies used for building the app.
|
||||
|
||||
## Project Structure: AI Agent Handling Guidelines
|
||||
|
||||
- `./app/src/main/java/com/owncloud/android/` Legacy components (Activities, datamodel, operations)
|
||||
- `./app/src/main/java/com/nextcloud/` Modern components (client APIs, DI, repositories, UI with Compose)
|
||||
- `./app/src/main/java/com/nextcloud/utils/extensions/` Extension functions for common types
|
||||
- `./app/src/main/java/com/nextcloud/ui/` Jetpack Compose UI components and screens
|
||||
- `./app/src/main/java/com/nextcloud/client/di/` Dependency injection configuration (Dagger 2)
|
||||
- `./app/src/main/java/com/nextcloud/client/assistant/` AI features (Assistant screen, chat, conversations, translations)
|
||||
- `./app/src/test/` Unit tests (small, isolated tests without Android SDK)
|
||||
- `./app/src/androidTest/` Instrumented tests (require Android SDK)
|
||||
- `./app/src/main/res/values/` Translations. Only update `./app/src/main/res/values/strings.xml`. Do not modify any other translation files or folders. Ignore all `values-*` directories (e.g., `values-es`, `values-fr`).
|
||||
|
||||
## General Guidance
|
||||
|
||||
Every new file needs to get a SPDX header in the first rows according to this template.
|
||||
The year in the first line must be replaced with the year when the file is created (for example, 2026 for files first added in 2026).
|
||||
The commenting signs need to be used depending on the file type.
|
||||
|
||||
New contributions use AGPL-3.0-or-later license. Files may also have `OR GPL-2.0-only` in the license if they originated from GPL-licensed code.
|
||||
|
||||
```plaintext
|
||||
SPDX-FileCopyrightText: <YEAR> Nextcloud GmbH and Nextcloud contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
```
|
||||
|
||||
Kotlin/Java:
|
||||
```kotlin
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: <year> Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
```
|
||||
|
||||
XML:
|
||||
```xml
|
||||
<!--
|
||||
~ Nextcloud - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: <year> Nextcloud GmbH and Nextcloud contributors
|
||||
~ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
```
|
||||
|
||||
Avoid creating source files that implement multiple types; instead, place each type in its own dedicated source file.
|
||||
|
||||
## Design
|
||||
|
||||
- Follow Material Design 3 guidelines
|
||||
- In addition to any Material Design wording guidelines, follow the Nextcloud wording guidelines at https://docs.nextcloud.com/server/latest/developer_manual/design/foundations.html#wording
|
||||
- Ensure the app works in both light and dark theme
|
||||
- Ensure the app works with different server primary colors by using the colorTheme of viewThemeUtils
|
||||
|
||||
## Architecture & Patterns
|
||||
|
||||
### Jetpack Compose
|
||||
|
||||
Modern UI is built with Jetpack Compose (Material 3). Key directories:
|
||||
- `com.nextcloud.ui.composeActivity` - Activities hosting Compose content
|
||||
- `com.nextcloud.ui.composeComponents` - Reusable Compose components
|
||||
- `com.nextcloud.client.assistant` - Compose-based Assistant screens and features
|
||||
|
||||
Use `StateFlow` and `MutableStateFlow` in ViewModels for state management. Collect state in Compose functions with `collectAsState()`.
|
||||
|
||||
### Dependency Injection
|
||||
|
||||
Uses Dagger 2 for major Android components (`Activity`, `Fragment`, `Service`, `BroadcastReceiver`, `ContentProvider`). Manual constructor injection for other components.
|
||||
|
||||
### Extension Functions
|
||||
|
||||
The `com.nextcloud.utils.extensions` package contains helper extensions organized by type (e.g., `FileExtensions.kt`, `StringExtensions.kt`, `ViewExtensions.kt`). Create focused extension files rather than putting multiple types in one file.
|
||||
|
||||
## Testing
|
||||
|
||||
### Unit Tests (`./app/src/test/`)
|
||||
- Small, isolated tests without Android SDK
|
||||
- Use Mockito with `mockito-kotlin` for easier mocking
|
||||
- Recommended command: `./gradlew jacocoTestGplayDebugUnitTest`
|
||||
- Tests use JUnit 4 with `@Test`, `@Before`, `@After` annotations
|
||||
|
||||
### Instrumented Tests (`./app/src/androidTest/`)
|
||||
- Tests requiring Android SDK (Activities, Fragments, database access)
|
||||
- Use Espresso for UI testing
|
||||
- Tests should inherit from `AbstractOnServerIT` if they need server communication
|
||||
- Always create a separate test user on test server to avoid data interference
|
||||
- Run with: `./gradlew createGplayDebugCoverageReport -Pcoverage=true`
|
||||
- Run specific test class: `./gradlew createGplayDebugCoverageReport -Pcoverage=true -Pandroid.testInstrumentationRunnerArguments.class=<fully.qualified.ClassName>`
|
||||
- Run one test method: `./gradlew createGplayDebugCoverageReport -Pcoverage=true -Pandroid.testInstrumentationRunnerArguments.class=<fully.qualified.ClassName>#methodName`
|
||||
|
||||
### Screenshot Tests (Shot)
|
||||
- Enabled via `SHOT_TEST=true` environment variable
|
||||
- Use: `scripts/androidScreenshotTest` to check, `scripts/updateScreenshots.sh` to regenerate
|
||||
- CI renders shadows differently; 0.5% tolerance is configured
|
||||
|
||||
## Code Quality Tools
|
||||
|
||||
All code is validated with the following tools. Fix findings in modified files:
|
||||
- **lint** - Android linting (configured in `app/lint.xml`)
|
||||
- **spotbugsGplayDebug** - Bug detection for Gplay variant
|
||||
- **detekt** - Kotlin code analysis (configured in `app/detekt.yml`)
|
||||
- **spotlessKotlinCheck** - Code formatting with ktlint
|
||||
|
||||
Run all checks with: `./gradlew check`
|
||||
|
||||
## Nextcloud Contribution Policy
|
||||
|
||||
All contributions generated or assisted by this agent must fully comply with:
|
||||
|
||||
- **[AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md)** - the primary reference for AI-specific rules, covering disclosure, author accountability, communication, security, licensing, code quality, and autonomous agent behavior.
|
||||
- **[Contribution Guidelines](https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md)** - covering testing requirements, the Developer Certificate of Origin (DCO), license headers, conventional commits, and translations. These apply in full to all contributions regardless of how they were produced.
|
||||
|
||||
### What this agent must always do
|
||||
|
||||
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
|
||||
- Ensure every pull request includes a disclosure of AI tool use in the PR description.
|
||||
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
|
||||
- Verify all dependencies against actual package registries before suggesting them. Do not use hallucinated or unverified package names.
|
||||
- Explicitly inform the contributor when any action they are about to take, or have taken, would violate the AI Contribution Policy or the Contribution Guidelines. Do not silently proceed. State which rule is at risk and what the contributor should do instead.
|
||||
- Warn the contributor if a pull request is growing too large. A PR approaching several thousand lines of changed code is a signal that it should be split into smaller, focused PRs. Suggest a logical split before the PR is opened, not after.
|
||||
- Recommend opening a ticket for discussion before starting implementation whenever a feature or change is sufficiently complex - for example when it touches multiple subsystems, requires architectural decisions, or the right approach is not yet clear. A ticket allows maintainers and the contributor to align on direction before code is written, avoiding wasted effort on a PR that may be rejected or require fundamental rework.
|
||||
|
||||
### What this agent must never do
|
||||
|
||||
- Open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be reviewed and submitted by a human.
|
||||
- Add `Signed-off-by` tags to commits. Only the human contributor can certify the Developer Certificate of Origin.
|
||||
- Generate or submit security reports without independent human verification. Report verified vulnerabilities via [HackerOne](https://hackerone.com/nextcloud), not as GitHub issues.
|
||||
- Write PR descriptions, review comments, or issue reports on behalf of the contributor. These must be in the contributor's own words.
|
||||
- Fully automate the resolution of issues labeled [`good first issue`](https://github.com/issues?q=org%3Anextcloud+label%3A%22good+first+issue%22) or similar beginner-friendly labels.
|
||||
- Submit code that has not been reviewed and cleaned up by the contributor. Dead code, redundant logic, excessive comments, and unrelated changes must be removed before submission.
|
||||
|
||||
## Commit and Pull Request Guidelines
|
||||
|
||||
### Commits
|
||||
|
||||
- All commits must be signed off (`git commit -s`) per the Developer Certificate of Origin (DCO). All PRs target `master`. Backports use `/backport to stable-X.Y` in a PR comment.
|
||||
|
||||
- Commit messages must follow the [Conventional Commits v1.0.0 specification](https://www.conventionalcommits.org/en/v1.0.0/#specification) — e.g. `feat(chat): add voice message playback`, `fix(call): handle MCU disconnect gracefully`.
|
||||
|
||||
- Every commit made with AI assistance must include an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer identifying the coding agent and model used:
|
||||
|
||||
```
|
||||
Assisted-by: ClaudeCode:claude-sonnet-4-6
|
||||
Assisted-by: Copilot:claude-sonnet-4-6
|
||||
```
|
||||
|
||||
General pattern: `Assisted-by: <coding-agent>:<model-version>`
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Include a short summary of what changed. *Example:* `fix: prevent crash on empty todo title`.
|
||||
- **Pull Request**: When the agent creates a PR, it should include a description summarizing the changes and why they were made. If a GitHub issue exists, reference it (e.g., “Closes #123”).
|
||||
|
||||
## Code Style
|
||||
|
||||
- Do not exceed 300 lines of code per file.
|
||||
- Line length: **120 characters**
|
||||
- Standard Android Studio formatter with EditorConfig.
|
||||
- Kotlin preferred for new code; legacy Java still present.
|
||||
- Do not use decorative section-divider comments of any kind (e.g. `// ── Title ───`, `// ------`, `// ======`).
|
||||
- Every new file must end with exactly one empty trailing line (no more, no less).
|
||||
- Do not add comments, documentation for every function you created instead make it self explanatory as much as possible.
|
||||
- Create models, states in different files instead of doing it one single file.
|
||||
- Do not use magic numbers.
|
||||
- Apply fail fast principle instead of using nested if-else statements.
|
||||
- Do not use multiple boolean flags to determine states instead use enums or sealed classes.
|
||||
- Use modern Java for Java classes. Optionals, virtual threads, records, streams if necessary.
|
||||
- Avoid hardcoded strings, colors, dimensions. Use resources.
|
||||
- Run lint, spotbugsGplayDebug, detekt, spotlessKotlinCheck and fix findings inside the files that have been changed.
|
||||
+50
-42
@@ -3,13 +3,13 @@ GEM
|
||||
specs:
|
||||
CFPropertyList (3.0.8)
|
||||
abbrev (0.1.2)
|
||||
addressable (2.8.9)
|
||||
addressable (2.9.0)
|
||||
public_suffix (>= 2.0.2, < 8.0)
|
||||
artifactory (3.0.17)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.4.0)
|
||||
aws-partitions (1.1227.0)
|
||||
aws-sdk-core (3.243.0)
|
||||
aws-partitions (1.1246.0)
|
||||
aws-sdk-core (3.246.0)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.992.0)
|
||||
aws-sigv4 (~> 1.9)
|
||||
@@ -17,17 +17,18 @@ GEM
|
||||
bigdecimal
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
logger
|
||||
aws-sdk-kms (1.122.0)
|
||||
aws-sdk-core (~> 3, >= 3.241.4)
|
||||
aws-sdk-kms (1.124.0)
|
||||
aws-sdk-core (~> 3, >= 3.244.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.216.0)
|
||||
aws-sdk-core (~> 3, >= 3.243.0)
|
||||
aws-sdk-s3 (1.221.0)
|
||||
aws-sdk-core (~> 3, >= 3.244.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sigv4 (1.12.1)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
babosa (1.0.4)
|
||||
base64 (0.3.0)
|
||||
benchmark (0.5.0)
|
||||
bigdecimal (3.3.1)
|
||||
cgi (0.4.2)
|
||||
claide (1.1.0)
|
||||
@@ -72,14 +73,16 @@ GEM
|
||||
faraday_middleware (1.2.1)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.4.1)
|
||||
fastlane (2.229.0)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
abbrev (~> 0.1.2)
|
||||
fastlane (2.234.0)
|
||||
CFPropertyList (>= 2.3, < 5.0.0)
|
||||
abbrev (~> 0.1)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
aws-sdk-s3 (~> 1.0)
|
||||
aws-sdk-s3 (~> 1.197)
|
||||
babosa (>= 1.0.3, < 2.0.0)
|
||||
bundler (>= 1.12.0, < 3.0.0)
|
||||
base64 (~> 0.2)
|
||||
benchmark (>= 0.1.0)
|
||||
bundler (>= 1.17.3, < 5.0.0)
|
||||
colored (~> 1.2)
|
||||
commander (~> 4.6)
|
||||
csv (~> 3.3)
|
||||
@@ -90,21 +93,24 @@ GEM
|
||||
faraday-cookie_jar (~> 0.0.6)
|
||||
faraday_middleware (~> 1.0)
|
||||
fastimage (>= 2.1.0, < 3.0.0)
|
||||
fastlane-sirp (>= 1.0.0)
|
||||
fastlane-sirp (>= 1.1.0)
|
||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||
google-apis-androidpublisher_v3 (~> 0.3)
|
||||
google-apis-playcustomapp_v1 (~> 0.1)
|
||||
google-cloud-env (>= 1.6.0, < 2.0.0)
|
||||
google-cloud-env (>= 1.6.0, <= 2.1.1)
|
||||
google-cloud-storage (~> 1.31)
|
||||
highline (~> 2.0)
|
||||
http-cookie (~> 1.0.5)
|
||||
json (< 3.0.0)
|
||||
jwt (>= 2.1.0, < 3)
|
||||
logger (>= 1.6, < 2.0)
|
||||
mini_magick (>= 4.9.4, < 5.0.0)
|
||||
multipart-post (>= 2.0.0, < 3.0.0)
|
||||
mutex_m (~> 0.3.0)
|
||||
mutex_m (~> 0.3)
|
||||
naturally (~> 2.2)
|
||||
nkf (~> 0.2)
|
||||
optparse (>= 0.1.1, < 1.0.0)
|
||||
ostruct (>= 0.1.0)
|
||||
plist (>= 3.1.0, < 4.0.0)
|
||||
rubyzip (>= 2.0.0, < 3.0.0)
|
||||
security (= 0.1.5)
|
||||
@@ -119,41 +125,42 @@ GEM
|
||||
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
|
||||
fastlane-plugin-huawei_appgallery_connect (1.0.31)
|
||||
cgi
|
||||
fastlane-sirp (1.0.0)
|
||||
sysrandom (~> 1.0)
|
||||
fastlane-sirp (1.1.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.54.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.3)
|
||||
google-apis-androidpublisher_v3 (0.100.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-core (0.18.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
httpclient (>= 2.8.1, < 3.a)
|
||||
googleauth (~> 1.9)
|
||||
httpclient (>= 2.8.3, < 3.a)
|
||||
mini_mime (~> 1.0)
|
||||
mutex_m
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.a)
|
||||
rexml
|
||||
google-apis-iamcredentials_v1 (0.17.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.13.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-storage_v1 (0.31.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-iamcredentials_v1 (0.27.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.17.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-storage_v1 (0.62.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-cloud-core (1.8.0)
|
||||
google-cloud-env (>= 1.0, < 3.a)
|
||||
google-cloud-errors (~> 1.0)
|
||||
google-cloud-env (1.6.0)
|
||||
faraday (>= 0.17.3, < 3.0)
|
||||
google-cloud-errors (1.5.0)
|
||||
google-cloud-storage (1.47.0)
|
||||
google-cloud-env (2.1.1)
|
||||
faraday (>= 1.0, < 3.a)
|
||||
google-cloud-errors (1.6.0)
|
||||
google-cloud-storage (1.59.0)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
google-apis-iamcredentials_v1 (~> 0.1)
|
||||
google-apis-storage_v1 (~> 0.31.0)
|
||||
google-apis-core (>= 0.18, < 2)
|
||||
google-apis-iamcredentials_v1 (~> 0.18)
|
||||
google-apis-storage_v1 (>= 0.42)
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
googleauth (~> 1.9)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (1.8.1)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
googleauth (1.11.2)
|
||||
faraday (>= 1.0, < 3.a)
|
||||
google-cloud-env (~> 2.1)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
multi_json (~> 1.11)
|
||||
os (>= 0.9, < 2.0)
|
||||
@@ -164,22 +171,24 @@ GEM
|
||||
httpclient (2.9.0)
|
||||
mutex_m
|
||||
jmespath (1.6.2)
|
||||
json (2.19.1)
|
||||
json (2.19.5)
|
||||
jwt (2.10.2)
|
||||
base64
|
||||
logger (1.7.0)
|
||||
mini_magick (4.13.2)
|
||||
mini_mime (1.1.5)
|
||||
multi_json (1.19.1)
|
||||
multi_json (1.21.1)
|
||||
multipart-post (2.4.1)
|
||||
mutex_m (0.3.0)
|
||||
nanaimo (0.4.0)
|
||||
naturally (2.3.0)
|
||||
nkf (0.2.0)
|
||||
optparse (0.8.1)
|
||||
os (1.1.4)
|
||||
ostruct (0.6.3)
|
||||
plist (3.7.2)
|
||||
public_suffix (6.0.2)
|
||||
rake (13.3.1)
|
||||
rake (13.4.2)
|
||||
representable (3.2.0)
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
@@ -198,7 +207,6 @@ GEM
|
||||
simctl (1.6.10)
|
||||
CFPropertyList
|
||||
naturally
|
||||
sysrandom (1.0.5)
|
||||
terminal-notifier (2.0.0)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
|
||||
@@ -29,6 +29,12 @@ precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "2015-2016 ownCloud Inc."
|
||||
SPDX-License-Identifier = "GPL-2.0-only"
|
||||
|
||||
[[annotations]]
|
||||
path = ["CLAUDE.md", "app/libs/local-maven/**/*.aar", "app/libs/local-maven/**/*.pom"]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "2026 Nextcloud GmbH and Nextcloud contributors"
|
||||
SPDX-License-Identifier = "AGPL-3.0-or-later"
|
||||
|
||||
[[annotations]]
|
||||
path = ["app/src/**/res/mipmap-**dpi/ic_launcher.png", "app/src/**/ic_launcher-web.png", "src/**/fastlane/metadata/en-US/images/*.png", "src/generic/fastlane/metadata/android/en-US/images/icon.png", "src/versionDev/fastlane/metadata/android/en-US/images/icon.png", "app/src/main/ic_launcher-web-round.png"]
|
||||
precedence = "aggregate"
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
/build
|
||||
/build
|
||||
/.cxx
|
||||
+18
-16
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
@file:Suppress("UnstableApiUsage", "DEPRECATION")
|
||||
|
||||
import com.android.build.gradle.internal.api.ApkVariantOutputImpl
|
||||
import com.github.spotbugs.snom.Confidence
|
||||
import com.github.spotbugs.snom.Effort
|
||||
import com.github.spotbugs.snom.SpotBugsTask
|
||||
@@ -24,11 +23,9 @@ plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
alias(libs.plugins.spotless)
|
||||
alias(libs.plugins.kapt)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.kotlin.parcelize)
|
||||
alias(libs.plugins.jetbrains.kotlin.android)
|
||||
alias(libs.plugins.spotbugs)
|
||||
alias(libs.plugins.detekt)
|
||||
// needed to make renovate run without shot, as shot requires Android SDK
|
||||
@@ -62,10 +59,10 @@ configurations.configureEach {
|
||||
}
|
||||
|
||||
// semantic versioning for version code
|
||||
val versionMajor = 33
|
||||
val versionMajor = 34
|
||||
val versionMinor = 1
|
||||
val versionPatch = 0
|
||||
val versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
|
||||
val versionBuild = 50 // 0-50=Alpha / 51-98=RC / 90-99=stable
|
||||
|
||||
val ndkEnv = buildMap {
|
||||
file("${project.rootDir}/ndk.env").readLines().forEach {
|
||||
@@ -84,8 +81,14 @@ val ncTestServerPassword = configProps["NC_TEST_SERVER_PASSWORD"]
|
||||
val ncTestServerBaseUrl = configProps["NC_TEST_SERVER_BASEURL"]
|
||||
|
||||
android {
|
||||
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
|
||||
// install this NDK version and CMake to produce smaller APKs. Build will still work if not installed
|
||||
ndkVersion = "${ndkEnv["NDK_VERSION"]}"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version = "${ndkEnv["CMAKE_VERSION"]}"
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
}
|
||||
}
|
||||
|
||||
namespace = "com.owncloud.android"
|
||||
testNamespace = "${namespace}.test"
|
||||
@@ -104,6 +107,10 @@ android {
|
||||
targetSdk = 36
|
||||
compileSdk = 36
|
||||
|
||||
ndk {
|
||||
abiFilters += listOf("arm64-v8a", "x86_64")
|
||||
}
|
||||
|
||||
buildConfigField("boolean", "CI", ciBuild.toString())
|
||||
buildConfigField("boolean", "RUNTIME_PERF_ANALYSIS", perfAnalysis.toString())
|
||||
|
||||
@@ -168,12 +175,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.configureEach {
|
||||
outputs.configureEach {
|
||||
if (this is ApkVariantOutputImpl) this.outputFileName = "${this.baseName}-${this.versionCode}.apk"
|
||||
}
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.isReturnDefaultValues = true
|
||||
animationsDisabled = true
|
||||
@@ -192,6 +193,7 @@ android {
|
||||
viewBinding = true
|
||||
aidl = true
|
||||
compose = true
|
||||
prefab = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
@@ -217,7 +219,9 @@ android {
|
||||
"MissingQuantity",
|
||||
"IconXmlAndPng",
|
||||
"SelectedPhotoAccess",
|
||||
"UnsafeIntentLaunch"
|
||||
"UnsafeIntentLaunch",
|
||||
"OldTargetApi",
|
||||
"AndroidGradlePluginVersion"
|
||||
)
|
||||
)
|
||||
htmlOutput = layout.buildDirectory.file("reports/lint/lint.html").get().asFile
|
||||
@@ -233,8 +237,6 @@ android {
|
||||
|
||||
}
|
||||
|
||||
kapt.useBuildCache = true
|
||||
|
||||
ksp.arg("room.schemaLocation", "$projectDir/schemas")
|
||||
|
||||
// Configure KSP for test variants
|
||||
@@ -445,6 +447,7 @@ dependencies {
|
||||
|
||||
// region Crypto
|
||||
implementation(libs.conscrypt.android)
|
||||
implementation(libs.android.openssl)
|
||||
// endregion
|
||||
|
||||
// region Library
|
||||
@@ -457,7 +460,6 @@ dependencies {
|
||||
|
||||
// region Markdown rendering
|
||||
implementation(libs.bundles.markdown.rendering)
|
||||
kapt(libs.prism4j.bundler)
|
||||
// endregion
|
||||
|
||||
// region Image cropping / rotation
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,195 +0,0 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.nextcloud.client
|
||||
|
||||
import android.view.View
|
||||
import androidx.test.core.app.launchActivity
|
||||
import androidx.test.espresso.Espresso.onView
|
||||
import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||
import androidx.test.espresso.contrib.DrawerActions
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isRoot
|
||||
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||
import com.owncloud.android.AbstractIT
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.lib.resources.activities.model.Activity
|
||||
import com.owncloud.android.lib.resources.activities.model.RichElement
|
||||
import com.owncloud.android.lib.resources.activities.model.RichObject
|
||||
import com.owncloud.android.lib.resources.activities.models.PreviewObject
|
||||
import com.owncloud.android.lib.resources.status.OCCapability
|
||||
import com.owncloud.android.ui.activities.ActivitiesActivity
|
||||
import com.owncloud.android.utils.ScreenshotTest
|
||||
import org.junit.Test
|
||||
import java.util.GregorianCalendar
|
||||
|
||||
class ActivitiesActivityIT : AbstractIT() {
|
||||
private val testClassName = "com.nextcloud.client.ActivitiesActivityIT"
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun openDrawer() {
|
||||
launchActivity<ActivitiesActivity>().use { scenario ->
|
||||
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
|
||||
|
||||
scenario.onActivity { sut ->
|
||||
val screenShotName = createName("${testClassName}_openDrawer", "")
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
|
||||
onView(withId(R.id.drawer_layout)).check(matches(isDisplayed()))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun loading() {
|
||||
launchActivity<ActivitiesActivity>().use { scenario ->
|
||||
scenario.onActivity { sut ->
|
||||
sut.binding?.emptyList?.root?.visibility = View.GONE
|
||||
sut.binding?.swipeContainingList?.visibility = View.GONE
|
||||
sut.binding?.loadingContent?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "loading", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
|
||||
scenario.onActivity { sut ->
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun empty() {
|
||||
launchActivity<ActivitiesActivity>().use { scenario ->
|
||||
scenario.onActivity { sut ->
|
||||
sut.showActivities(mutableListOf(), nextcloudClient, -1)
|
||||
sut.setProgressIndicatorState(false)
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "empty", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
|
||||
scenario.onActivity { sut ->
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
@SuppressWarnings("MagicNumber")
|
||||
fun showActivities() {
|
||||
val capability = OCCapability()
|
||||
capability.versionMayor = 20
|
||||
fileDataStorageManager.saveCapabilities(capability)
|
||||
|
||||
val date = GregorianCalendar()
|
||||
date.set(2005, 4, 17, 10, 35, 30) // random date
|
||||
|
||||
val richObjectList: ArrayList<RichObject> = ArrayList()
|
||||
richObjectList.add(RichObject("file", "abc", "text.txt", "/text.txt", "link", "tag"))
|
||||
richObjectList.add(RichObject("file", "1", "text.txt", "/text.txt", "link", "tag"))
|
||||
|
||||
val previewObjectList1: ArrayList<PreviewObject> = ArrayList()
|
||||
previewObjectList1.add(PreviewObject(1, "source", "link", true, "text/plain", "view", "test1.txt"))
|
||||
|
||||
val previewObjectList3: ArrayList<PreviewObject> = ArrayList()
|
||||
previewObjectList3.add(PreviewObject(1, "source", "link", true, "image/jpg", "view", "test1.jpg"))
|
||||
|
||||
val activities = mutableListOf(
|
||||
Activity(
|
||||
1,
|
||||
date.time,
|
||||
date.time,
|
||||
"files",
|
||||
"file_changed",
|
||||
"user1",
|
||||
"user1",
|
||||
"You changed text.txt",
|
||||
"",
|
||||
"icon",
|
||||
"link",
|
||||
"files",
|
||||
"1",
|
||||
"/text.txt",
|
||||
previewObjectList1,
|
||||
RichElement("", richObjectList)
|
||||
),
|
||||
Activity(
|
||||
1,
|
||||
date.time,
|
||||
date.time,
|
||||
"dav",
|
||||
"calendar_event",
|
||||
"user1",
|
||||
"user1",
|
||||
"You have deleted calendar entry Appointment",
|
||||
"",
|
||||
"icon",
|
||||
"link",
|
||||
"calendar",
|
||||
"35",
|
||||
"",
|
||||
ArrayList(),
|
||||
RichElement()
|
||||
),
|
||||
Activity(
|
||||
1,
|
||||
date.time,
|
||||
date.time,
|
||||
"files",
|
||||
"file_changed",
|
||||
"user1",
|
||||
"user1",
|
||||
"You changed image.jpg",
|
||||
"",
|
||||
"icon",
|
||||
"link",
|
||||
"files",
|
||||
"1",
|
||||
"/image.jpg",
|
||||
previewObjectList3,
|
||||
RichElement("", richObjectList)
|
||||
)
|
||||
)
|
||||
|
||||
launchActivity<ActivitiesActivity>().use { scenario ->
|
||||
scenario.onActivity { sut ->
|
||||
sut.showActivities(activities as List<Any>, nextcloudClient, -1)
|
||||
sut.setProgressIndicatorState(false)
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "showActivities", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
|
||||
scenario.onActivity { sut ->
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun error() {
|
||||
launchActivity<ActivitiesActivity>().use { scenario ->
|
||||
scenario.onActivity { sut ->
|
||||
sut.showEmptyContent("Error", "Error! Please try again later!")
|
||||
sut.setProgressIndicatorState(false)
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "error", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
|
||||
scenario.onActivity { sut ->
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
package com.nextcloud.client
|
||||
|
||||
import android.view.View
|
||||
import androidx.test.core.app.ActivityScenario
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.espresso.Espresso.onView
|
||||
import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||
import androidx.test.espresso.contrib.DrawerActions
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isRoot
|
||||
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||
import com.owncloud.android.AbstractIT
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.lib.resources.activities.model.Activity
|
||||
import com.owncloud.android.lib.resources.activities.model.RichElement
|
||||
import com.owncloud.android.lib.resources.activities.model.RichObject
|
||||
import com.owncloud.android.lib.resources.activities.models.PreviewObject
|
||||
import com.owncloud.android.lib.resources.status.OCCapability
|
||||
import com.owncloud.android.ui.fragment.ActivitiesFragment
|
||||
import com.owncloud.android.ui.navigation.NavigatorActivity
|
||||
import com.owncloud.android.ui.navigation.NavigatorScreen
|
||||
import com.owncloud.android.utils.ScreenshotTest
|
||||
import org.junit.Test
|
||||
import java.util.GregorianCalendar
|
||||
|
||||
class ActivitiesFragmentIT : AbstractIT() {
|
||||
private val testClassName = "com.nextcloud.client.ActivitiesFragmentIT"
|
||||
|
||||
private fun ActivityScenario<NavigatorActivity>.getFragment(): ActivitiesFragment? {
|
||||
var fragment: ActivitiesFragment? = null
|
||||
onActivity { activity ->
|
||||
fragment = activity.supportFragmentManager
|
||||
.findFragmentByTag(NavigatorScreen.Activities.tag) as? ActivitiesFragment
|
||||
}
|
||||
return fragment
|
||||
}
|
||||
|
||||
private fun launchActivitiesActivity(): ActivityScenario<NavigatorActivity> {
|
||||
val intent = NavigatorActivity.intent(
|
||||
ApplicationProvider.getApplicationContext(),
|
||||
NavigatorScreen.Activities
|
||||
)
|
||||
return ActivityScenario.launch(intent)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun openDrawer() {
|
||||
launchActivitiesActivity().use { scenario ->
|
||||
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
|
||||
scenario.onActivity { sut ->
|
||||
val screenShotName = createName("${testClassName}_openDrawer", "")
|
||||
screenshotViaName(sut, screenShotName)
|
||||
}
|
||||
onView(withId(R.id.drawer_layout)).check(matches(isDisplayed()))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun loading() {
|
||||
launchActivitiesActivity().use { scenario ->
|
||||
val fragment = scenario.getFragment() ?: return
|
||||
scenario.onActivity {
|
||||
fragment.binding?.emptyList?.root?.visibility = View.GONE
|
||||
fragment.binding?.swipeContainingList?.visibility = View.GONE
|
||||
fragment.binding?.loadingContent?.visibility = View.VISIBLE
|
||||
}
|
||||
val screenShotName = createName("${testClassName}_loading", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
scenario.onActivity { sut -> screenshotViaName(sut, screenShotName) }
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun empty() {
|
||||
launchActivitiesActivity().use { scenario ->
|
||||
val fragment = scenario.getFragment() ?: return
|
||||
scenario.onActivity {
|
||||
fragment.showActivities(mutableListOf(), nextcloudClient, -1)
|
||||
fragment.setProgressIndicatorState(false)
|
||||
}
|
||||
val screenShotName = createName("${testClassName}_empty", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
scenario.onActivity { sut -> screenshotViaName(sut, screenShotName) }
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
@SuppressWarnings("MagicNumber")
|
||||
fun showActivities() {
|
||||
val capability = OCCapability()
|
||||
capability.versionMayor = 20
|
||||
fileDataStorageManager.saveCapabilities(capability)
|
||||
|
||||
val date = GregorianCalendar()
|
||||
date.set(2005, 4, 17, 10, 35, 30)
|
||||
|
||||
val richObjectList: ArrayList<RichObject> = ArrayList()
|
||||
richObjectList.add(RichObject("file", "abc", "text.txt", "/text.txt", "link", "tag"))
|
||||
richObjectList.add(RichObject("file", "1", "text.txt", "/text.txt", "link", "tag"))
|
||||
|
||||
val previewObjectList1: ArrayList<PreviewObject> = ArrayList()
|
||||
previewObjectList1.add(PreviewObject(1, "source", "link", true, "text/plain", "view", "test1.txt"))
|
||||
|
||||
val previewObjectList3: ArrayList<PreviewObject> = ArrayList()
|
||||
previewObjectList3.add(PreviewObject(1, "source", "link", true, "image/jpg", "view", "test1.jpg"))
|
||||
|
||||
val activities = mutableListOf(
|
||||
Activity(
|
||||
1, date.time, date.time, "files", "file_changed", "user1", "user1",
|
||||
"You changed text.txt", "", "icon", "link", "files", "1", "/text.txt",
|
||||
previewObjectList1, RichElement("", richObjectList)
|
||||
),
|
||||
Activity(
|
||||
1, date.time, date.time, "dav", "calendar_event", "user1", "user1",
|
||||
"You have deleted calendar entry Appointment", "", "icon", "link", "calendar",
|
||||
"35", "", ArrayList(), RichElement()
|
||||
),
|
||||
Activity(
|
||||
1, date.time, date.time, "files", "file_changed", "user1", "user1",
|
||||
"You changed image.jpg", "", "icon", "link", "files", "1", "/image.jpg",
|
||||
previewObjectList3, RichElement("", richObjectList)
|
||||
)
|
||||
)
|
||||
|
||||
launchActivitiesActivity().use { scenario ->
|
||||
val fragment = scenario.getFragment() ?: return
|
||||
scenario.onActivity {
|
||||
fragment.showActivities(activities as List<Any>, nextcloudClient, -1)
|
||||
fragment.setProgressIndicatorState(false)
|
||||
}
|
||||
val screenShotName = createName("${testClassName}_showActivities", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
scenario.onActivity { sut -> screenshotViaName(sut, screenShotName) }
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun error() {
|
||||
launchActivitiesActivity().use { scenario ->
|
||||
val fragment = scenario.getFragment() ?: return
|
||||
scenario.onActivity {
|
||||
fragment.showEmptyContent("Error", "Error! Please try again later!")
|
||||
fragment.setProgressIndicatorState(false)
|
||||
}
|
||||
val screenShotName = createName("${testClassName}_error", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
scenario.onActivity { sut -> screenshotViaName(sut, screenShotName) }
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-6
@@ -8,29 +8,31 @@
|
||||
*/
|
||||
package com.nextcloud.client
|
||||
|
||||
import androidx.test.core.app.launchActivity
|
||||
import androidx.test.core.app.ActivityScenario
|
||||
import androidx.test.espresso.Espresso.onView
|
||||
import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isRoot
|
||||
import com.nextcloud.test.GrantStoragePermissionRule.Companion.grant
|
||||
import com.owncloud.android.AbstractIT
|
||||
import com.owncloud.android.ui.activity.CommunityActivity
|
||||
import com.owncloud.android.ui.navigation.NavigatorActivity
|
||||
import com.owncloud.android.ui.navigation.NavigatorScreen
|
||||
import com.owncloud.android.utils.ScreenshotTest
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.rules.TestRule
|
||||
|
||||
class CommunityActivityIT : AbstractIT() {
|
||||
private val testClassName = "com.nextcloud.client.CommunityActivityIT"
|
||||
class CommunityFragmentIT : AbstractIT() {
|
||||
private val testClassName = "com.nextcloud.client.CommunityFragmentIT"
|
||||
|
||||
@get:Rule
|
||||
var storagePermissionRule: TestRule = grant()
|
||||
var storagePermissionRules: TestRule = grant()
|
||||
|
||||
@Test
|
||||
@ScreenshotTest
|
||||
fun open() {
|
||||
launchActivity<CommunityActivity>().use { scenario ->
|
||||
val intent = NavigatorActivity.intent(targetContext, NavigatorScreen.Community)
|
||||
ActivityScenario.launch<NavigatorActivity>(intent).use { scenario ->
|
||||
val screenShotName = createName(testClassName + "_" + "open", "")
|
||||
onView(isRoot()).check(matches(isDisplayed()))
|
||||
|
||||
@@ -69,6 +69,12 @@ class BitmapDecodeTests {
|
||||
assertNull(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testToFileWhenPathIsNullShouldReturnNull() {
|
||||
val result = null.toFile()
|
||||
assertNull(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testToFileWhenFileDoesNotExistShouldReturnNull() {
|
||||
val nonExistentPath = tempDir.resolve("does_not_exist.jpg")
|
||||
|
||||
@@ -25,19 +25,17 @@ import kotlin.random.Random
|
||||
@Suppress("TooManyFunctions", "MagicNumber")
|
||||
class FileDeletionTests : AbstractIT() {
|
||||
|
||||
private lateinit var tempDir: File
|
||||
private val createdFilePaths = mutableListOf<String>()
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
val parent = System.getProperty("java.io.tmpdir")
|
||||
val childPath = "file_deletion_test_${System.currentTimeMillis()}"
|
||||
tempDir = File(parent, childPath)
|
||||
tempDir.mkdirs()
|
||||
createdFilePaths.clear()
|
||||
}
|
||||
|
||||
@After
|
||||
fun cleanup() {
|
||||
tempDir.deleteRecursively()
|
||||
createdFilePaths.forEach { File(it).delete() }
|
||||
createdFilePaths.clear()
|
||||
}
|
||||
|
||||
private fun getRandomRemoteId(): String = Random
|
||||
@@ -45,6 +43,17 @@ class FileDeletionTests : AbstractIT() {
|
||||
.toString()
|
||||
.padEnd(32, '0')
|
||||
|
||||
private fun createFileAtExpectedPath(ocFile: OCFile, content: String = "Temporary test content"): File {
|
||||
val expectedPath = FileStorageUtils.getDefaultSavePathFor(user.accountName, ocFile)
|
||||
val localFile = File(expectedPath).apply {
|
||||
parentFile?.mkdirs()
|
||||
createNewFile()
|
||||
writeText(content)
|
||||
}
|
||||
createdFilePaths.add(localFile.absolutePath)
|
||||
return localFile
|
||||
}
|
||||
|
||||
private fun createAndSaveSingleFileWithLocalCopy(): OCFile {
|
||||
val now = System.currentTimeMillis()
|
||||
|
||||
@@ -59,11 +68,7 @@ class FileDeletionTests : AbstractIT() {
|
||||
permissions = "RWDNV"
|
||||
}
|
||||
|
||||
val localFile = File(tempDir, "TestFile_${file.fileId}.txt").apply {
|
||||
parentFile?.mkdirs()
|
||||
createNewFile()
|
||||
writeText("Temporary test content")
|
||||
}
|
||||
val localFile = createFileAtExpectedPath(file)
|
||||
file.storagePath = localFile.absolutePath
|
||||
|
||||
storageManager.saveFile(file)
|
||||
@@ -117,11 +122,11 @@ class FileDeletionTests : AbstractIT() {
|
||||
|
||||
listOf(rootFolder, subFolder, file1, file2).forEach { storageManager.saveFile(it) }
|
||||
|
||||
val file1Path = File(tempDir, "file1_${file1.fileId}.txt").apply { createNewFile() }
|
||||
val file2Path = File(tempDir, "file2_${file2.fileId}.txt").apply { createNewFile() }
|
||||
val localFile1 = createFileAtExpectedPath(file1)
|
||||
val localFile2 = createFileAtExpectedPath(file2)
|
||||
|
||||
file1.storagePath = file1Path.absolutePath
|
||||
file2.storagePath = file2Path.absolutePath
|
||||
file1.storagePath = localFile1.absolutePath
|
||||
file2.storagePath = localFile2.absolutePath
|
||||
|
||||
storageManager.saveFile(file1)
|
||||
storageManager.saveFile(file2)
|
||||
@@ -132,69 +137,85 @@ class FileDeletionTests : AbstractIT() {
|
||||
private fun getMixedOcFiles(): List<OCFile> {
|
||||
val now = System.currentTimeMillis()
|
||||
|
||||
fun createFolder(id: Long, parentId: Long, path: String): OCFile = OCFile(path).apply {
|
||||
fileId = id
|
||||
fun saveFolder(parentId: Long, path: String): OCFile = OCFile(path).apply {
|
||||
this.parentId = parentId
|
||||
remoteId = getRandomRemoteId()
|
||||
mimeType = MimeType.DIRECTORY
|
||||
creationTimestamp = now
|
||||
modificationTimestamp = now
|
||||
permissions = "RWDNVCK"
|
||||
}
|
||||
}.also { storageManager.saveFile(it) }
|
||||
|
||||
fun createFile(id: Long, parentId: Long, path: String, size: Long, mime: String): OCFile = OCFile(path).apply {
|
||||
fileId = id
|
||||
this.parentId = parentId
|
||||
remoteId = getRandomRemoteId()
|
||||
fileLength = size
|
||||
creationTimestamp = now
|
||||
mimeType = mime
|
||||
modificationTimestamp = now
|
||||
permissions = "RWDNV"
|
||||
}
|
||||
|
||||
val list = mutableListOf<OCFile>()
|
||||
|
||||
list.add(createFolder(1, 0, "/"))
|
||||
|
||||
list.add(createFolder(5, 2, "/Documents/Projects"))
|
||||
list.add(createFile(9, 5, "/Documents/Projects/spec.txt", 12000, MimeType.TEXT_PLAIN))
|
||||
list.add(createFolder(2, 1, "/Documents"))
|
||||
list.add(createFile(11, 7, "/Photos/Vacation/img2.jpg", 300000, MimeType.JPEG))
|
||||
list.add(createFolder(7, 3, "/Photos/Vacation"))
|
||||
list.add(createFile(4, 2, "/Documents/example.pdf", 150000, MimeType.PDF))
|
||||
list.add(createFolder(3, 1, "/Photos"))
|
||||
list.add(createFile(12, 3, "/Photos/cover.png", 80000, MimeType.PNG))
|
||||
list.add(createFile(6, 5, "/Documents/Projects/readme.txt", 2000, MimeType.TEXT_PLAIN))
|
||||
list.add(createFolder(8, 5, "/Documents/Projects/Archive"))
|
||||
list.add(createFile(13, 8, "/Documents/Projects/Archive/old.bmp", 900000, MimeType.BMP))
|
||||
list.add(createFile(10, 7, "/Photos/Vacation/img1.jpg", 250000, MimeType.JPEG))
|
||||
list.add(createFolder(14, 1, "/Temp"))
|
||||
list.add(createFile(15, 14, "/Temp/tmp_file_1.txt", 400, MimeType.TEXT_PLAIN))
|
||||
list.add(createFile(16, 14, "/Temp/tmp_file_2.txt", 800, MimeType.TEXT_PLAIN))
|
||||
list.add(createFolder(17, 14, "/Temp/Nested"))
|
||||
list.add(createFile(18, 17, "/Temp/Nested/deep.txt", 100, MimeType.TEXT_PLAIN))
|
||||
list.add(createFile(19, 2, "/Documents/notes.txt", 1500, MimeType.TEXT_PLAIN))
|
||||
list.add(createFolder(20, 3, "/Photos/EmptyFolder"))
|
||||
|
||||
list.forEach { ocFile ->
|
||||
if (!ocFile.isFolder) {
|
||||
val localFile = File(tempDir, ocFile.remoteId).apply {
|
||||
parentFile?.mkdirs()
|
||||
createNewFile()
|
||||
writeText("test content")
|
||||
}
|
||||
ocFile.storagePath = localFile.absolutePath
|
||||
storageManager.saveFile(ocFile)
|
||||
} else {
|
||||
// For folders, create the folder in tempDir
|
||||
val localFolder = File(tempDir, ocFile.remoteId).apply { mkdirs() }
|
||||
ocFile.storagePath = localFolder.absolutePath
|
||||
storageManager.saveFile(ocFile)
|
||||
fun saveFileWithLocalCopy(parentId: Long, path: String, size: Long, mime: String): OCFile {
|
||||
val ocFile = OCFile(path).apply {
|
||||
this.parentId = parentId
|
||||
remoteId = getRandomRemoteId()
|
||||
fileLength = size
|
||||
creationTimestamp = now
|
||||
mimeType = mime
|
||||
modificationTimestamp = now
|
||||
permissions = "RWDNV"
|
||||
storagePath = FileStorageUtils.getDefaultSavePathFor(user.accountName, this)
|
||||
}
|
||||
val localFile = File(ocFile.storagePath).apply {
|
||||
parentFile?.mkdirs()
|
||||
createNewFile()
|
||||
writeText("test content")
|
||||
}
|
||||
createdFilePaths.add(localFile.absolutePath)
|
||||
storageManager.saveFile(ocFile)
|
||||
return ocFile
|
||||
}
|
||||
|
||||
return list
|
||||
val root = saveFolder(0, "/")
|
||||
val documents = saveFolder(root.fileId, "/Documents")
|
||||
val photos = saveFolder(root.fileId, "/Photos")
|
||||
val temp = saveFolder(root.fileId, "/Temp")
|
||||
val projects = saveFolder(documents.fileId, "/Documents/Projects")
|
||||
val vacation = saveFolder(photos.fileId, "/Photos/Vacation")
|
||||
val archive = saveFolder(projects.fileId, "/Documents/Projects/Archive")
|
||||
val nested = saveFolder(temp.fileId, "/Temp/Nested")
|
||||
val emptyFolder = saveFolder(photos.fileId, "/Photos/EmptyFolder")
|
||||
|
||||
val allEntries = mutableListOf(root, documents, photos, temp, projects, vacation, archive, nested, emptyFolder)
|
||||
|
||||
allEntries.add(
|
||||
saveFileWithLocalCopy(
|
||||
projects.fileId,
|
||||
"/Documents/Projects/spec.txt",
|
||||
12000,
|
||||
MimeType.TEXT_PLAIN
|
||||
)
|
||||
)
|
||||
allEntries.add(saveFileWithLocalCopy(vacation.fileId, "/Photos/Vacation/img2.jpg", 300000, MimeType.JPEG))
|
||||
allEntries.add(saveFileWithLocalCopy(documents.fileId, "/Documents/example.pdf", 150000, MimeType.PDF))
|
||||
allEntries.add(saveFileWithLocalCopy(photos.fileId, "/Photos/cover.png", 80000, MimeType.PNG))
|
||||
allEntries.add(
|
||||
saveFileWithLocalCopy(
|
||||
projects.fileId,
|
||||
"/Documents/Projects/readme.txt",
|
||||
2000,
|
||||
MimeType.TEXT_PLAIN
|
||||
)
|
||||
)
|
||||
allEntries.add(
|
||||
saveFileWithLocalCopy(
|
||||
archive.fileId,
|
||||
"/Documents/Projects/Archive/old.bmp",
|
||||
900000,
|
||||
MimeType.BMP
|
||||
)
|
||||
)
|
||||
allEntries.add(saveFileWithLocalCopy(vacation.fileId, "/Photos/Vacation/img1.jpg", 250000, MimeType.JPEG))
|
||||
allEntries.add(saveFileWithLocalCopy(temp.fileId, "/Temp/tmp_file_1.txt", 400, MimeType.TEXT_PLAIN))
|
||||
allEntries.add(saveFileWithLocalCopy(temp.fileId, "/Temp/tmp_file_2.txt", 800, MimeType.TEXT_PLAIN))
|
||||
allEntries.add(saveFileWithLocalCopy(nested.fileId, "/Temp/Nested/deep.txt", 100, MimeType.TEXT_PLAIN))
|
||||
allEntries.add(saveFileWithLocalCopy(documents.fileId, "/Documents/notes.txt", 1500, MimeType.TEXT_PLAIN))
|
||||
|
||||
return allEntries.sortedWith(
|
||||
compareBy<OCFile> { it.isFolder }
|
||||
.thenByDescending { it.remotePath.count { c -> c == '/' } }
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package com.nextcloud.utils
|
||||
|
||||
import com.nextcloud.utils.extensions.forbiddenFilenameBaseNames
|
||||
import com.nextcloud.utils.extensions.forbiddenFilenameCharacters
|
||||
import com.nextcloud.utils.extensions.forbiddenFilenameExtensions
|
||||
import com.nextcloud.utils.extensions.forbiddenFilenames
|
||||
import com.owncloud.android.AbstractIT
|
||||
import com.owncloud.android.lib.resources.status.OCCapability
|
||||
import junit.framework.TestCase.assertEquals
|
||||
import junit.framework.TestCase.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("MagicNumber", "TooManyFunctions")
|
||||
class OCCapabilityJsonToListTests : AbstractIT() {
|
||||
private var capability: OCCapability = fileDataStorageManager.getCapability(account.name)
|
||||
|
||||
// region Valid Input
|
||||
@Test
|
||||
fun testForbiddenFilenamesParsedCorrectly() {
|
||||
capability.forbiddenFilenamesJson = """[".htaccess", ".htaccess"]"""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(listOf(".htaccess", ".htaccess"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testForbiddenFilenameBaseNamesParsedCorrectly() {
|
||||
capability.forbiddenFilenameBaseNamesJson = """["con", "prn", "aux"]"""
|
||||
val result = capability.forbiddenFilenameBaseNames()
|
||||
assertEquals(listOf("con", "prn", "aux"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testForbiddenFilenameExtensionsParsedCorrectly() {
|
||||
capability.forbiddenFilenameExtensionJson = """[" ",".",".part"]"""
|
||||
val result = capability.forbiddenFilenameExtensions()
|
||||
assertEquals(listOf(" ", ".", ".part"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testForbiddenFilenameCharactersParsedCorrectly() {
|
||||
capability.forbiddenFilenameCharactersJson = """["<", ">", ":", "\\", "/", "|", "?", "*", "&"]"""
|
||||
val result = capability.forbiddenFilenameCharacters()
|
||||
assertEquals(listOf("<", ">", ":", "\\", "/", "|", "?", "*", "&"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEmptyArrayReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = """[]"""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSingleElementArray() {
|
||||
capability.forbiddenFilenamesJson = """[".htaccess"]"""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(listOf(".htaccess"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testArrayWithWhitespaceAroundJson() {
|
||||
capability.forbiddenFilenameBaseNamesJson = """
|
||||
["con", "prn", "aux", "nul", "com0", "com1", "com2", "com3", "com4",
|
||||
"com5", "com6", "com7", "com8", "com9", "com¹", "com²", "com³",
|
||||
"lpt0", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7",
|
||||
"lpt8", "lpt9", "lpt¹", "lpt²", "lpt³"]
|
||||
"""
|
||||
val result = capability.forbiddenFilenameBaseNames()
|
||||
assertEquals(30, result.size)
|
||||
assertTrue(result.contains("con"))
|
||||
assertTrue(result.contains("lpt³"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUnicodeCharactersPreserved() {
|
||||
capability.forbiddenFilenameBaseNamesJson = """["com¹", "com²", "com³", "lpt¹", "lpt²", "lpt³"]"""
|
||||
val result = capability.forbiddenFilenameBaseNames()
|
||||
assertEquals(listOf("com¹", "com²", "com³", "lpt¹", "lpt²", "lpt³"), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDuplicateEntriesPreserved() {
|
||||
capability.forbiddenFilenameExtensionJson = """[".part", ".part"]"""
|
||||
val result = capability.forbiddenFilenameExtensions()
|
||||
assertEquals(listOf(".part", ".part"), result)
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region Null and Blank Input
|
||||
@Test
|
||||
fun testNullJsonReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = null
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testBlankJsonReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = " "
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEmptyStringJsonReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = ""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region Malformed Input
|
||||
@Test
|
||||
fun testMalformedJsonReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = """[".htaccess", """
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testNonArrayJsonObjectReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = """{"key": "value"}"""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPlainStringJsonReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = """.htaccess"""
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testHtmlErrorPageReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = "<html><body>Internal Server Error</body></html>"
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testJsonNullLiteralReturnsEmptyList() {
|
||||
capability.forbiddenFilenamesJson = "null"
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region Oversized Input
|
||||
@Test
|
||||
fun testOversizedJsonReturnsEmptyList() {
|
||||
val hugeEntry = "a".repeat(1024)
|
||||
val entries = Array(600) { """"$hugeEntry"""" }
|
||||
capability.forbiddenFilenamesJson = "[${entries.joinToString(",")}]"
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(emptyList<String>(), result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testJsonJustUnderSizeLimitIsParsed() {
|
||||
val entries = Array(100) { i -> """"entry$i"""" }
|
||||
capability.forbiddenFilenamesJson = "[${entries.joinToString(",")}]"
|
||||
val result = capability.forbiddenFilenames()
|
||||
assertEquals(100, result.size)
|
||||
assertEquals("entry0", result[0])
|
||||
assertEquals("entry99", result[99])
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
@@ -14,16 +14,13 @@ import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.nextcloud.client.database.entity.UploadEntity
|
||||
import com.nextcloud.client.database.entity.toOCUpload
|
||||
import com.nextcloud.client.database.entity.toUploadEntity
|
||||
import com.nextcloud.utils.date.DateFormatPattern
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.utils.DisplayUtils
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
class UploadDateTests {
|
||||
|
||||
@@ -97,12 +94,12 @@ class UploadDateTests {
|
||||
|
||||
@Test
|
||||
fun getRelativeDateTimeStringReturnsFutureAsAbsoluteWhenShowFutureIsFalse() {
|
||||
val formatter = SimpleDateFormat("MMM d, yyyy h:mm:ss a", Locale.US)
|
||||
val expected = formatter.format(Date(System.currentTimeMillis() + ONE_MINUTE))
|
||||
val time = System.currentTimeMillis() + ONE_MINUTE
|
||||
val expected = java.text.DateFormat.getDateTimeInstance().format(Date(time))
|
||||
|
||||
val result = DisplayUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
System.currentTimeMillis() + ONE_MINUTE,
|
||||
time,
|
||||
DateUtils.SECOND_IN_MILLIS,
|
||||
DateUtils.WEEK_IN_MILLIS,
|
||||
0,
|
||||
@@ -130,8 +127,19 @@ class UploadDateTests {
|
||||
@Test
|
||||
fun getRelativeDateTimeStringReturnsAbbreviatedStringForOneWeekAgo() {
|
||||
val time = System.currentTimeMillis() - ONE_WEEK
|
||||
val formatter = SimpleDateFormat(DateFormatPattern.MonthWithDate.pattern, Locale.US)
|
||||
val expected = formatter.format(Date(time))
|
||||
val expectedString = DateUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
time,
|
||||
DateUtils.MINUTE_IN_MILLIS,
|
||||
DateUtils.WEEK_IN_MILLIS,
|
||||
0
|
||||
).toString()
|
||||
val parts = expectedString.split(",")
|
||||
val expected = if (parts.size == 2) {
|
||||
if (parts[1].contains(":") && !parts[0].contains(":")) parts[0].trim() else parts[1].trim()
|
||||
} else {
|
||||
expectedString
|
||||
}
|
||||
|
||||
assertRelativeDateTimeString(time, expected)
|
||||
}
|
||||
@@ -139,8 +147,19 @@ class UploadDateTests {
|
||||
@Test
|
||||
fun getRelativeDateTimeStringReturnsAbbreviatedStringForOneMonthAgo() {
|
||||
val time = System.currentTimeMillis() - ONE_MONTH
|
||||
val formatter = SimpleDateFormat(DateFormatPattern.MonthWithDate.pattern, Locale.US)
|
||||
val expected = formatter.format(Date(time))
|
||||
val expectedString = DateUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
time,
|
||||
DateUtils.SECOND_IN_MILLIS,
|
||||
DateUtils.WEEK_IN_MILLIS,
|
||||
0
|
||||
).toString()
|
||||
val parts = expectedString.split(",")
|
||||
val expected = if (parts.size == 2) {
|
||||
if (parts[1].contains(":") && !parts[0].contains(":")) parts[0].trim() else parts[1].trim()
|
||||
} else {
|
||||
expectedString
|
||||
}
|
||||
|
||||
assertRelativeDateTimeString(time, expected, DateUtils.SECOND_IN_MILLIS)
|
||||
}
|
||||
@@ -148,8 +167,19 @@ class UploadDateTests {
|
||||
@Test
|
||||
fun getRelativeDateTimeStringReturnsAbsoluteStringForOneYearAgo() {
|
||||
val time = System.currentTimeMillis() - ONE_YEAR
|
||||
val formatter = SimpleDateFormat("M/d/YYYY", Locale.US)
|
||||
val expected = formatter.format(Date(time))
|
||||
val expectedString = DateUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
time,
|
||||
DateUtils.SECOND_IN_MILLIS,
|
||||
DateUtils.WEEK_IN_MILLIS,
|
||||
0
|
||||
).toString()
|
||||
val parts = expectedString.split(",")
|
||||
val expected = if (parts.size == 2) {
|
||||
if (parts[1].contains(":") && !parts[0].contains(":")) parts[0].trim() else parts[1].trim()
|
||||
} else {
|
||||
expectedString
|
||||
}
|
||||
|
||||
assertRelativeDateTimeString(time, expected, DateUtils.SECOND_IN_MILLIS)
|
||||
}
|
||||
@@ -194,7 +224,19 @@ class UploadDateTests {
|
||||
assertEquals(expected, result)
|
||||
|
||||
testTimestamp = System.currentTimeMillis() - 7 * DateUtils.DAY_IN_MILLIS
|
||||
expected = SimpleDateFormat(DateFormatPattern.MonthWithDate.pattern, Locale.US).format(testTimestamp)
|
||||
val expectedString = DateUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
testTimestamp,
|
||||
DateUtils.DAY_IN_MILLIS,
|
||||
DateUtils.WEEK_IN_MILLIS,
|
||||
0
|
||||
).toString()
|
||||
val parts = expectedString.split(",")
|
||||
expected = if (parts.size == 2) {
|
||||
if (parts[1].contains(":") && !parts[0].contains(":")) parts[0].trim() else parts[1].trim()
|
||||
} else {
|
||||
expectedString
|
||||
}
|
||||
result = DisplayUtils.getRelativeDateTimeString(
|
||||
context,
|
||||
testTimestamp,
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package com.nextcloud.utils
|
||||
|
||||
import com.nextcloud.utils.extensions.webDavParentPath
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class WebDavParentPathTests {
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenCorrectParentShouldReturnOneLevelAbove() {
|
||||
assertEquals("/Photos/Vacation/", "/Photos/Vacation/beach.jpg".webDavParentPath())
|
||||
assertEquals("/work/docs/", "/work/docs/notes.txt".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenDeepNestingShouldReturnDirectParent() {
|
||||
assertEquals("/a/b/c/d/", "/a/b/c/d/e.txt".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenRootFileShouldReturnRoot() {
|
||||
assertEquals("/", "/image.png".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenSlashShouldReturnRoot() {
|
||||
assertEquals("/", "/".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenEmptyStringShouldReturnRoot() {
|
||||
assertEquals("/", "".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenOnlySlashesShouldReturnRoot() {
|
||||
assertEquals("/", "///".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenRelativePathShouldReturnOneLevelAbove() {
|
||||
assertEquals("Documents/", "Documents/file.pdf".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenSingleWordPathShouldReturnRoot() {
|
||||
assertEquals("/", "readme.md".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenTrailingSlashShouldReturnOneLevelAbove() {
|
||||
assertEquals("/Photos/", "/Photos/Vacation/".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenMultipleTrailingSlashesShouldReturnOneLevelAbove() {
|
||||
assertEquals("/Photos/", "/Photos/Vacation///".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenEncodedSpacesShouldPreserveEncoding() {
|
||||
assertEquals("/My%20Photos/", "/My%20Photos/beach%20photo.jpg".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenEncodedSpecialCharsShouldPreserveEncoding() {
|
||||
assertEquals("/files/%23reports/", "/files/%23reports/q1%262.pdf".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenUnicodeCharsShouldReturnOneLevelAbove() {
|
||||
assertEquals("/照片/假期/", "/照片/假期/海滩.jpg".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenSingleCharFileAtRootShouldReturnRoot() {
|
||||
assertEquals("/", "/a".webDavParentPath())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testWebDavParentPathWhenGivenSingleCharDirShouldReturnOneLevelAbove() {
|
||||
assertEquals("/a/", "/a/b".webDavParentPath())
|
||||
}
|
||||
}
|
||||
@@ -393,6 +393,11 @@ public abstract class AbstractIT {
|
||||
};
|
||||
|
||||
PowerManagementService powerManagementServiceMock = new PowerManagementService() {
|
||||
@Override
|
||||
public boolean isIgnoringOptimization() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public BatteryStatus getBattery() {
|
||||
|
||||
@@ -205,12 +205,12 @@ public abstract class AbstractOnServerIT extends AbstractIT {
|
||||
ConnectivityService connectivityServiceMock = new ConnectivityService() {
|
||||
@Override
|
||||
public void isNetworkAndServerAvailable(@NonNull GenericCallback<Boolean> callback) {
|
||||
|
||||
callback.onComplete(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -225,6 +225,11 @@ public abstract class AbstractOnServerIT extends AbstractIT {
|
||||
};
|
||||
|
||||
PowerManagementService powerManagementServiceMock = new PowerManagementService() {
|
||||
@Override
|
||||
public boolean isIgnoringOptimization() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public BatteryStatus getBattery() {
|
||||
@@ -248,7 +253,7 @@ public abstract class AbstractOnServerIT extends AbstractIT {
|
||||
user,
|
||||
null,
|
||||
ocUpload,
|
||||
NameCollisionPolicy.DEFAULT,
|
||||
NameCollisionPolicy.OVERWRITE,
|
||||
localBehaviour,
|
||||
targetContext,
|
||||
false,
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.db.OCUpload;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.operations.DownloadFileOperation;
|
||||
import com.owncloud.android.operations.RefreshFolderOperation;
|
||||
import com.owncloud.android.operations.RemoveFileOperation;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Tests related to file downloads.
|
||||
*/
|
||||
public class DownloadIT extends AbstractOnServerIT {
|
||||
private static final String FOLDER = "/testUpload/";
|
||||
|
||||
@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 verifyDownload() {
|
||||
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
|
||||
FOLDER + "nonEmpty.txt",
|
||||
account.name);
|
||||
|
||||
uploadOCUpload(ocUpload);
|
||||
|
||||
OCUpload ocUpload2 = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
|
||||
FOLDER + "nonEmpty2.txt",
|
||||
account.name);
|
||||
|
||||
uploadOCUpload(ocUpload2);
|
||||
|
||||
refreshFolder("/");
|
||||
refreshFolder(FOLDER);
|
||||
|
||||
OCFile file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
|
||||
OCFile file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt");
|
||||
verifyDownload(file1, file2);
|
||||
|
||||
assertTrue(new DownloadFileOperation(user, file1, targetContext).execute(client).isSuccess());
|
||||
assertTrue(new DownloadFileOperation(user, file2, targetContext).execute(client).isSuccess());
|
||||
|
||||
refreshFolder(FOLDER);
|
||||
|
||||
file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
|
||||
file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt");
|
||||
|
||||
verifyDownload(file1, file2);
|
||||
}
|
||||
|
||||
private void verifyDownload(OCFile file1, OCFile file2) {
|
||||
assertNotNull(file1);
|
||||
assertNotNull(file2);
|
||||
assertNotSame(file1.getStoragePath(), file2.getStoragePath());
|
||||
|
||||
assertTrue(new File(file1.getStoragePath()).exists());
|
||||
assertTrue(new File(file2.getStoragePath()).exists());
|
||||
|
||||
// test against hardcoded path to make sure that it is correct
|
||||
assertEquals("/storage/emulated/0/Android/media/"+targetContext.getPackageName()+"/nextcloud/" +
|
||||
Uri.encode(account.name, "@") + "/testUpload/nonEmpty.txt",
|
||||
file1.getStoragePath());
|
||||
assertEquals("/storage/emulated/0/Android/media/"+targetContext.getPackageName()+"/nextcloud/" +
|
||||
Uri.encode(account.name, "@") + "/testUpload/nonEmpty2.txt",
|
||||
file2.getStoragePath());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android
|
||||
|
||||
import android.net.Uri
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.db.OCUpload
|
||||
import com.owncloud.android.operations.DownloadFileOperation
|
||||
import com.owncloud.android.operations.RefreshFolderOperation
|
||||
import com.owncloud.android.operations.RemoveFileOperation
|
||||
import com.owncloud.android.utils.FileStorageUtils
|
||||
import org.junit.After
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
class DownloadIT : AbstractOnServerIT() {
|
||||
@After
|
||||
override fun after() {
|
||||
val result = RefreshFolderOperation(
|
||||
storageManager.getFileByPath("/"),
|
||||
System.currentTimeMillis() / 1000L,
|
||||
false,
|
||||
true,
|
||||
storageManager,
|
||||
user,
|
||||
targetContext
|
||||
)
|
||||
.execute(client)
|
||||
|
||||
// cleanup only if folder exists
|
||||
if (result.isSuccess && storageManager.getFileByDecryptedRemotePath(FOLDER) != null) {
|
||||
RemoveFileOperation(
|
||||
storageManager.getFileByDecryptedRemotePath(FOLDER)!!,
|
||||
false,
|
||||
user,
|
||||
false,
|
||||
targetContext,
|
||||
storageManager
|
||||
)
|
||||
.execute(client)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyDownload() {
|
||||
val ocUpload = OCUpload(
|
||||
FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
|
||||
FOLDER + "nonEmpty.txt",
|
||||
account.name
|
||||
)
|
||||
|
||||
uploadOCUpload(ocUpload)
|
||||
|
||||
val ocUpload2 = OCUpload(
|
||||
FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
|
||||
FOLDER + "nonEmpty2.txt",
|
||||
account.name
|
||||
)
|
||||
|
||||
uploadOCUpload(ocUpload2)
|
||||
|
||||
refreshFolder(FOLDER)
|
||||
|
||||
var file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
|
||||
var file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
|
||||
|
||||
val operation1 = DownloadFileOperation(user, file1, targetContext)
|
||||
val operation1Result = operation1.execute(client)
|
||||
Assert.assertTrue(operation1Result.isSuccess)
|
||||
|
||||
val operation2 = DownloadFileOperation(user, file2, targetContext)
|
||||
val operation2Result = operation2.execute(client)
|
||||
Assert.assertTrue(operation2Result.isSuccess)
|
||||
|
||||
refreshFolder(FOLDER)
|
||||
file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
|
||||
file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
|
||||
|
||||
verifyDownload(file1, file2)
|
||||
}
|
||||
|
||||
private fun verifyDownload(file1: OCFile?, file2: OCFile?) {
|
||||
Assert.assertNotNull(file1)
|
||||
Assert.assertNotNull(file2)
|
||||
Assert.assertNotSame(file1!!.storagePath, file2!!.storagePath)
|
||||
|
||||
Assert.assertTrue(Path(file1.storagePath).exists())
|
||||
Assert.assertTrue(Path(file2.storagePath).exists())
|
||||
|
||||
// test against hardcoded path to make sure that it is correct
|
||||
Assert.assertEquals(
|
||||
"/storage/emulated/0/Android/media/" + targetContext.packageName + "/nextcloud/" +
|
||||
Uri.encode(account.name, "@") + "/testUpload/nonEmpty.txt",
|
||||
file1.storagePath
|
||||
)
|
||||
Assert.assertEquals(
|
||||
"/storage/emulated/0/Android/media/" + targetContext.packageName + "/nextcloud/" +
|
||||
Uri.encode(account.name, "@") + "/testUpload/nonEmpty2.txt",
|
||||
file2.storagePath
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val FOLDER = "/testUpload/"
|
||||
}
|
||||
}
|
||||
Loaded 100 of 512 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user