diff --git a/packages/nextcloud/test/api/files_sharing/files_sharing_test.dart b/packages/nextcloud/test/api/files_sharing/files_sharing_test.dart new file mode 100644 index 00000000000..23ba4ad8f04 --- /dev/null +++ b/packages/nextcloud/test/api/files_sharing/files_sharing_test.dart @@ -0,0 +1,118 @@ +import 'dart:io'; + +import 'package:nextcloud/core.dart' as core; +import 'package:nextcloud/files_sharing.dart' as files_sharing; +import 'package:nextcloud/webdav.dart' as webdav; +import 'package:nextcloud_test/nextcloud_test.dart'; +import 'package:test/test.dart'; + +void main() { + presets('server', 'files_sharing', (tester) { + group('shareapi', () { + test('createShare', () async { + final file = File('test/files/test.png'); + await tester.client.webdav.putFile(file, file.statSync(), webdav.PathUri.parse('create-share.png')); + addTearDown(() async { + closeFixture(); + await tester.client.webdav.delete(webdav.PathUri.parse('create-share.png')); + }); + + final response = await tester.client.filesSharing.shareapi.createShare( + $body: files_sharing.ShareapiCreateShareRequestApplicationJson( + (b) => b + ..path = '/create-share.png' + ..shareType = core.ShareType.user.index + ..shareWith = 'user2', + ), + ); + expect(response.statusCode, 200); + expect(() => response.headers, isA()); + expect(response.body.ocs.data.canDelete, true); + expect(response.body.ocs.data.canEdit, true); + expect(response.body.ocs.data.displaynameFileOwner, 'User One'); + expect(response.body.ocs.data.displaynameOwner, 'User One'); + expect(response.body.ocs.data.fileParent, isPositive); + expect(response.body.ocs.data.fileSource, isPositive); + expect(response.body.ocs.data.fileTarget, '/create-share.png'); + expect(response.body.ocs.data.hasPreview, true); + expect(response.body.ocs.data.hideDownload, files_sharing.Share_HideDownload.$0); + expect(response.body.ocs.data.id, isNotEmpty); + expect(response.body.ocs.data.itemMtime, isPositive); + expect(response.body.ocs.data.itemPermissions, 27); + expect(response.body.ocs.data.itemSize, 8650); + expect(response.body.ocs.data.itemSource, isPositive); + expect(response.body.ocs.data.itemType, files_sharing.Share_ItemType.file); + expect(response.body.ocs.data.label, ''); + expect(response.body.ocs.data.mailSend, files_sharing.Share_MailSend.$1); + expect(response.body.ocs.data.mimetype, 'image/png'); + expect(response.body.ocs.data.note, ''); + expect(response.body.ocs.data.path, '/create-share.png'); + expect(response.body.ocs.data.permissions, 19); + expect(response.body.ocs.data.shareType, core.ShareType.user.index); + expect(response.body.ocs.data.shareWith, 'user2'); + expect(response.body.ocs.data.shareWithDisplayname, 'User Two'); + expect(response.body.ocs.data.shareWithDisplaynameUnique, 'user2'); + expect(response.body.ocs.data.stime, isPositive); + expect(response.body.ocs.data.storage, isPositive); + expect(response.body.ocs.data.storageId, 'home::user1'); + expect(response.body.ocs.data.uidFileOwner, 'user1'); + expect(response.body.ocs.data.uidOwner, 'user1'); + }); + + test('getShares', () async { + final file = File('test/files/test.png'); + await tester.client.webdav.putFile(file, file.statSync(), webdav.PathUri.parse('list-shares.png')); + addTearDown(() async { + closeFixture(); + await tester.client.webdav.delete(webdav.PathUri.parse('list-shares.png')); + }); + + await tester.client.filesSharing.shareapi.createShare( + $body: files_sharing.ShareapiCreateShareRequestApplicationJson( + (b) => b + ..path = '/list-shares.png' + ..shareType = core.ShareType.user.index + ..shareWith = 'user2', + ), + ); + + final response = await tester.client.filesSharing.shareapi.getShares( + path: '/list-shares.png', + reshares: 'true', + ); + expect(response.statusCode, 200); + expect(() => response.headers, isA()); + expect(response.body.ocs.data.single.canDelete, true); + expect(response.body.ocs.data.single.canEdit, true); + expect(response.body.ocs.data.single.displaynameFileOwner, 'User One'); + expect(response.body.ocs.data.single.displaynameOwner, 'User One'); + expect(response.body.ocs.data.single.fileParent, isPositive); + expect(response.body.ocs.data.single.fileSource, isPositive); + expect(response.body.ocs.data.single.fileTarget, '/list-shares.png'); + expect(response.body.ocs.data.single.hasPreview, true); + expect(response.body.ocs.data.single.hideDownload, files_sharing.Share_HideDownload.$0); + expect(response.body.ocs.data.single.id, isNotEmpty); + expect(response.body.ocs.data.single.itemMtime, isPositive); + expect(response.body.ocs.data.single.itemPermissions, 27); + expect(response.body.ocs.data.single.itemSize, 8650); + expect(response.body.ocs.data.single.itemSource, isPositive); + expect(response.body.ocs.data.single.itemType, files_sharing.Share_ItemType.file); + expect(response.body.ocs.data.single.label, null); + expect(response.body.ocs.data.single.mailSend, files_sharing.Share_MailSend.$0); + expect(response.body.ocs.data.single.mimetype, 'image/png'); + expect(response.body.ocs.data.single.note, ''); + expect(response.body.ocs.data.single.path, '/list-shares.png'); + expect(response.body.ocs.data.single.permissions, 19); + expect(response.body.ocs.data.single.shareType, core.ShareType.user.index); + expect(response.body.ocs.data.single.shareWith, 'user2'); + expect(response.body.ocs.data.single.shareWithDisplayname, 'User Two'); + expect(response.body.ocs.data.single.shareWithDisplaynameUnique, 'user2'); + expect(response.body.ocs.data.single.stime, isPositive); + expect(response.body.ocs.data.single.storage, isPositive); + expect(response.body.ocs.data.single.storageId, 'home::user1'); + expect(response.body.ocs.data.single.uidFileOwner, 'user1'); + expect(response.body.ocs.data.single.uidOwner, 'user1'); + }); + }); + }); +} diff --git a/packages/nextcloud/test/fixtures/files_sharing/create_share.regexp b/packages/nextcloud/test/fixtures/files_sharing/create_share.regexp new file mode 100644 index 00000000000..70c0339648f --- /dev/null +++ b/packages/nextcloud/test/fixtures/files_sharing/create_share.regexp @@ -0,0 +1,13 @@ +PUT http://localhost/remote\.php/webdav/create-share\.png +authorization: Bearer mock +content-length: 8650 +content-type: application/xml +ocs-apirequest: true +requesttoken: token +.+ +POST http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares +accept: application/json +authorization: Bearer mock +content-type: application/json; charset=utf-8 +ocs-apirequest: true +\{"shareType":0,"publicUpload":"false","password":"","expireDate":"","note":"","label":"","path":"/create-share\.png","shareWith":"user2"\} \ No newline at end of file diff --git a/packages/nextcloud/test/fixtures/files_sharing/list_shares.regexp b/packages/nextcloud/test/fixtures/files_sharing/list_shares.regexp new file mode 100644 index 00000000000..91a9a7f1b06 --- /dev/null +++ b/packages/nextcloud/test/fixtures/files_sharing/list_shares.regexp @@ -0,0 +1,17 @@ +PUT http://localhost/remote\.php/webdav/list-shares\.png +authorization: Bearer mock +content-length: 8650 +content-type: application/xml +ocs-apirequest: true +requesttoken: token +iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAIAAABnsVYUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AMPEAwo2\+TdNAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAACAASURBVHja7NgxAQAgDMAwQMH8O8IVJuiXSOjZfWcWAAAAAAD8diQAAAAAAKBgQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgI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AAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADZL2FUgAAAThJREFUAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwCKNfglZ0nZIRwAAAABJRU5ErkJggg== +POST http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares +accept: application/json +authorization: Bearer mock +content-type: application/json; charset=utf-8 +ocs-apirequest: true +\{"shareType":0,"publicUpload":"false","password":"","expireDate":"","note":"","label":"","path":"/list-shares\.png","shareWith":"user2"\} +GET http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares\?shared_with_me=false&reshares=true&subfiles=false&path=%2Flist-shares\.png&include_tags=false +accept: application/json +authorization: Bearer mock +ocs-apirequest: true \ No newline at end of file