cozy-sharing 6.0.2 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/SharingBanner/hooks/useSharingInfos.js +35 -37
- package/dist/SharingBanner/hooks/useSharingInfos.spec.js +40 -44
- package/dist/SharingProvider.js +351 -375
- package/dist/SharingProvider.spec.js +29 -33
- package/dist/components/CozyPassFingerprintDialogContent.spec.js +14 -16
- package/dist/components/Recipient/LinkRecipientPermissions.js +25 -27
- package/dist/components/Recipient/Recipient.spec.js +39 -43
- package/dist/components/Recipient/RecipientPermissions.js +20 -22
- package/dist/components/ShareButton.js +0 -2
- package/dist/components/ShareByEmail.js +53 -55
- package/dist/components/ShareByEmail.spec.js +50 -52
- package/dist/components/ShareByLink.js +73 -79
- package/dist/components/ShareDialogCozyToCozy.spec.js +238 -264
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +33 -35
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.spec.js +240 -266
- package/dist/components/SharedBadge.js +0 -2
- package/dist/components/badge.styl +7 -5
- package/dist/components/button.styl +11 -12
- package/dist/components/useFetchDocumentPath.js +16 -18
- package/dist/fetchNextPermissions.js +15 -17
- package/dist/getSharedDocument.js +13 -15
- package/dist/getSharedDocument.spec.js +10 -12
- package/dist/helpers/contacts.js +65 -69
- package/dist/helpers/contacts.spec.js +30 -32
- package/dist/helpers/files.js +26 -28
- package/dist/helpers/files.spec.js +54 -58
- package/dist/helpers/sharings.js +56 -60
- package/dist/helpers/synchronousJobQueue.js +19 -21
- package/dist/helpers/synchronousJobQueue.spec.js +39 -43
- package/dist/stylesheet.css +28 -820
- package/package.json +3 -3
- package/src/components/badge.styl +7 -5
- package/src/components/button.styl +11 -12
|
@@ -40,42 +40,38 @@ describe('allLoaded', function () {
|
|
|
40
40
|
it('Change to True when all data is loaded', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
41
41
|
var component;
|
|
42
42
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
43
|
-
while (1) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return setTimeout(resolve, 100);
|
|
62
|
-
});
|
|
43
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
44
|
+
case 0:
|
|
45
|
+
component = mount( /*#__PURE__*/React.createElement(AppWrapper, {
|
|
46
|
+
client: client
|
|
47
|
+
}, /*#__PURE__*/React.createElement(SharingContext.Consumer, null, function (_ref3) {
|
|
48
|
+
var allLoaded = _ref3.allLoaded;
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", null, "allLoaded: ".concat(allLoaded));
|
|
50
|
+
})));
|
|
51
|
+
expect(component.find('div').text()).toBe('allLoaded: false');
|
|
52
|
+
_context2.next = 4;
|
|
53
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
54
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
55
|
+
while (1) switch (_context.prev = _context.next) {
|
|
56
|
+
case 0:
|
|
57
|
+
_context.next = 2;
|
|
58
|
+
return new Promise(function (resolve) {
|
|
59
|
+
return setTimeout(resolve, 100);
|
|
60
|
+
});
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})));
|
|
62
|
+
case 2:
|
|
63
|
+
case "end":
|
|
64
|
+
return _context.stop();
|
|
65
|
+
}
|
|
66
|
+
}, _callee);
|
|
67
|
+
})));
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
case 4:
|
|
70
|
+
expect(component.find('div').text()).toBe('allLoaded: true');
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
72
|
+
case 5:
|
|
73
|
+
case "end":
|
|
74
|
+
return _context2.stop();
|
|
79
75
|
}
|
|
80
76
|
}, _callee2);
|
|
81
77
|
})));
|
|
@@ -21,23 +21,21 @@ describe('CozyPassFingerprintDialogContent', function () {
|
|
|
21
21
|
var props, _setup, getByText;
|
|
22
22
|
|
|
23
23
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24
|
-
while (1) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
expect(getByText('SOME_FINGERPRINT')).toBeTruthy();
|
|
24
|
+
while (1) switch (_context.prev = _context.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
props = {
|
|
27
|
+
recipientConfirmationData: {
|
|
28
|
+
name: 'SOME_NAME',
|
|
29
|
+
email: 'SOME_EMAIL',
|
|
30
|
+
fingerprintPhrase: 'SOME_FINGERPRINT'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
_setup = setup(props), getByText = _setup.getByText;
|
|
34
|
+
expect(getByText('SOME_FINGERPRINT')).toBeTruthy();
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
36
|
+
case 3:
|
|
37
|
+
case "end":
|
|
38
|
+
return _context.stop();
|
|
41
39
|
}
|
|
42
40
|
}, _callee);
|
|
43
41
|
})));
|
|
@@ -46,33 +46,31 @@ var LinkRecipientPermissions = function LinkRecipientPermissions(_ref) {
|
|
|
46
46
|
var deleteShareLink = /*#__PURE__*/function () {
|
|
47
47
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
48
48
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
49
|
-
while (1) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return _context.stop();
|
|
75
|
-
}
|
|
49
|
+
while (1) switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
_context.prev = 0;
|
|
52
|
+
setLoading(true);
|
|
53
|
+
_context.next = 4;
|
|
54
|
+
return onDisable(document);
|
|
55
|
+
|
|
56
|
+
case 4:
|
|
57
|
+
_context.next = 10;
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
case 6:
|
|
61
|
+
_context.prev = 6;
|
|
62
|
+
_context.t0 = _context["catch"](0);
|
|
63
|
+
Alerter.error(t("".concat(documentType, ".share.error.revoke")));
|
|
64
|
+
logger.log(_context.t0);
|
|
65
|
+
|
|
66
|
+
case 10:
|
|
67
|
+
_context.prev = 10;
|
|
68
|
+
setLoading(false);
|
|
69
|
+
return _context.finish(10);
|
|
70
|
+
|
|
71
|
+
case 13:
|
|
72
|
+
case "end":
|
|
73
|
+
return _context.stop();
|
|
76
74
|
}
|
|
77
75
|
}, _callee, null, [[0, 6, 10, 13]]);
|
|
78
76
|
}));
|
|
@@ -61,28 +61,26 @@ describe('Recipient component', function () {
|
|
|
61
61
|
var onRevoke, onRevokeSelf, _setup3, getByText;
|
|
62
62
|
|
|
63
63
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
64
|
-
while (1) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
expect(onRevokeSelf).toBeCalled();
|
|
64
|
+
while (1) switch (_context.prev = _context.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
onRevoke = jest.fn();
|
|
67
|
+
onRevokeSelf = jest.fn();
|
|
68
|
+
_setup3 = setup({
|
|
69
|
+
instance: 'foo.mycozy.cloud',
|
|
70
|
+
status: 'ready',
|
|
71
|
+
type: 'two-way',
|
|
72
|
+
documentType: 'Files',
|
|
73
|
+
onRevoke: onRevoke,
|
|
74
|
+
onRevokeSelf: onRevokeSelf
|
|
75
|
+
}), getByText = _setup3.getByText;
|
|
76
|
+
fireEvent.click(getByText('can change'));
|
|
77
|
+
fireEvent.click(getByText('Remove me from sharing'));
|
|
78
|
+
expect(onRevoke).not.toBeCalled();
|
|
79
|
+
expect(onRevokeSelf).toBeCalled();
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
81
|
+
case 7:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context.stop();
|
|
86
84
|
}
|
|
87
85
|
}, _callee);
|
|
88
86
|
})));
|
|
@@ -90,29 +88,27 @@ describe('Recipient component', function () {
|
|
|
90
88
|
var onRevoke, onRevokeSelf, _setup4, getByText;
|
|
91
89
|
|
|
92
90
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
93
|
-
while (1) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
expect(onRevokeSelf).not.toBeCalled();
|
|
91
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
onRevoke = jest.fn();
|
|
94
|
+
onRevokeSelf = jest.fn();
|
|
95
|
+
_setup4 = setup({
|
|
96
|
+
instance: 'foo.mycozy.cloud',
|
|
97
|
+
status: 'ready',
|
|
98
|
+
type: 'two-way',
|
|
99
|
+
isOwner: true,
|
|
100
|
+
documentType: 'Files',
|
|
101
|
+
onRevoke: onRevoke,
|
|
102
|
+
onRevokeSelf: onRevokeSelf
|
|
103
|
+
}), getByText = _setup4.getByText;
|
|
104
|
+
fireEvent.click(getByText('can change'));
|
|
105
|
+
fireEvent.click(getByText('Remove from sharing'));
|
|
106
|
+
expect(onRevoke).toBeCalled();
|
|
107
|
+
expect(onRevokeSelf).not.toBeCalled();
|
|
111
108
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
109
|
+
case 7:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context2.stop();
|
|
116
112
|
}
|
|
117
113
|
}, _callee2);
|
|
118
114
|
})));
|
|
@@ -56,34 +56,32 @@ var RecipientPermissions = function RecipientPermissions(_ref) {
|
|
|
56
56
|
|
|
57
57
|
var onRevokeClick = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
58
58
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
59
|
-
while (1) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
setRevoking(true);
|
|
59
|
+
while (1) switch (_context.prev = _context.next) {
|
|
60
|
+
case 0:
|
|
61
|
+
setRevoking(true);
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
if (!isOwner) {
|
|
64
|
+
_context.next = 6;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
_context.next = 4;
|
|
69
|
+
return onRevoke(document, sharingId, index);
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
case 4:
|
|
72
|
+
_context.next = 8;
|
|
73
|
+
break;
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
case 6:
|
|
76
|
+
_context.next = 8;
|
|
77
|
+
return onRevokeSelf(document);
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
case 8:
|
|
80
|
+
setRevoking(false);
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
82
|
+
case 9:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context.stop();
|
|
87
85
|
}
|
|
88
86
|
}, _callee);
|
|
89
87
|
})), [isOwner, onRevoke, onRevokeSelf, document, sharingId, index]);
|
|
@@ -7,8 +7,6 @@ import React from 'react';
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import { Button } from 'cozy-ui/transpiled/react/Button';
|
|
9
9
|
var styles = {
|
|
10
|
-
"CozyTheme--inverted": "button__CozyTheme--inverted___3s3RR",
|
|
11
|
-
"CozyTheme--normal": "button__CozyTheme--normal___OteWq",
|
|
12
10
|
"coz-btn-shared": "button__coz-btn-shared___2BoMk",
|
|
13
11
|
"coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___2Vjfh"
|
|
14
12
|
};
|
|
@@ -119,62 +119,60 @@ export var ShareByEmail = function ShareByEmail(_ref) {
|
|
|
119
119
|
var recipientsBefore, _contacts, readWriteRecipients, readOnlyRecipients;
|
|
120
120
|
|
|
121
121
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
122
|
-
while (1) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
_context.next = 2;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return _context.abrupt("return");
|
|
131
|
-
|
|
132
|
-
case 2:
|
|
133
|
-
// we can't use currentRecipients prop in getSuccessMessage because it may use
|
|
134
|
-
// the updated prop to count the new recipients
|
|
135
|
-
recipientsBefore = currentRecipients;
|
|
136
|
-
setLoading(true);
|
|
137
|
-
_context.prev = 4;
|
|
138
|
-
_context.next = 7;
|
|
139
|
-
return getOrCreateFromArray(client, recipients, createContact);
|
|
140
|
-
|
|
141
|
-
case 7:
|
|
142
|
-
_contacts = _context.sent;
|
|
143
|
-
readWriteRecipients = [];
|
|
144
|
-
readOnlyRecipients = [];
|
|
145
|
-
|
|
146
|
-
if (selectedOption === 'readOnly') {
|
|
147
|
-
readOnlyRecipients = _contacts;
|
|
148
|
-
} else {
|
|
149
|
-
readWriteRecipients = _contacts;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
_context.next = 13;
|
|
153
|
-
return onShare({
|
|
154
|
-
document: document,
|
|
155
|
-
recipients: readWriteRecipients,
|
|
156
|
-
readOnlyRecipients: readOnlyRecipients,
|
|
157
|
-
description: sharingDesc,
|
|
158
|
-
openSharing: readWriteRecipients.length > 0
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
case 13:
|
|
162
|
-
Alerter.success(t.apply(void 0, _toConsumableArray(getSuccessMessage(recipientsBefore, _contacts, documentType))));
|
|
163
|
-
reset();
|
|
164
|
-
_context.next = 22;
|
|
122
|
+
while (1) switch (_context.prev = _context.next) {
|
|
123
|
+
case 0:
|
|
124
|
+
if (!(recipients.length === 0)) {
|
|
125
|
+
_context.next = 2;
|
|
165
126
|
break;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return _context.abrupt("return");
|
|
130
|
+
|
|
131
|
+
case 2:
|
|
132
|
+
// we can't use currentRecipients prop in getSuccessMessage because it may use
|
|
133
|
+
// the updated prop to count the new recipients
|
|
134
|
+
recipientsBefore = currentRecipients;
|
|
135
|
+
setLoading(true);
|
|
136
|
+
_context.prev = 4;
|
|
137
|
+
_context.next = 7;
|
|
138
|
+
return getOrCreateFromArray(client, recipients, createContact);
|
|
139
|
+
|
|
140
|
+
case 7:
|
|
141
|
+
_contacts = _context.sent;
|
|
142
|
+
readWriteRecipients = [];
|
|
143
|
+
readOnlyRecipients = [];
|
|
144
|
+
|
|
145
|
+
if (selectedOption === 'readOnly') {
|
|
146
|
+
readOnlyRecipients = _contacts;
|
|
147
|
+
} else {
|
|
148
|
+
readWriteRecipients = _contacts;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
_context.next = 13;
|
|
152
|
+
return onShare({
|
|
153
|
+
document: document,
|
|
154
|
+
recipients: readWriteRecipients,
|
|
155
|
+
readOnlyRecipients: readOnlyRecipients,
|
|
156
|
+
description: sharingDesc,
|
|
157
|
+
openSharing: readWriteRecipients.length > 0
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
case 13:
|
|
161
|
+
Alerter.success(t.apply(void 0, _toConsumableArray(getSuccessMessage(recipientsBefore, _contacts, documentType))));
|
|
162
|
+
reset();
|
|
163
|
+
_context.next = 22;
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case 17:
|
|
167
|
+
_context.prev = 17;
|
|
168
|
+
_context.t0 = _context["catch"](4);
|
|
169
|
+
Alerter.error('Error.generic');
|
|
170
|
+
reset();
|
|
171
|
+
throw _context.t0;
|
|
172
|
+
|
|
173
|
+
case 22:
|
|
174
|
+
case "end":
|
|
175
|
+
return _context.stop();
|
|
178
176
|
}
|
|
179
177
|
}, _callee, null, [[4, 17]]);
|
|
180
178
|
}));
|
|
@@ -16,62 +16,60 @@ describe('ShareByEmailComponent', function () {
|
|
|
16
16
|
it('shoud call share if submited', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
17
17
|
var onShare, props, root;
|
|
18
18
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19
|
-
while (1) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
});
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
onShare = jest.fn();
|
|
22
|
+
props = {
|
|
23
|
+
contacts: {
|
|
24
|
+
data: []
|
|
25
|
+
},
|
|
26
|
+
groups: {
|
|
27
|
+
data: []
|
|
28
|
+
},
|
|
29
|
+
documentType: 'Files',
|
|
30
|
+
onShare: onShare,
|
|
31
|
+
document: {
|
|
32
|
+
id: 'doc_id'
|
|
33
|
+
},
|
|
34
|
+
sharingDesc: 'test',
|
|
35
|
+
createContact: jest.fn()
|
|
36
|
+
};
|
|
37
|
+
root = render( /*#__PURE__*/React.createElement(AppLike, null, /*#__PURE__*/React.createElement(ShareByEmail, props)));
|
|
38
|
+
act(function () {
|
|
39
|
+
fireEvent.change(root.getByPlaceholderText('Add contacts or groups'), {
|
|
40
|
+
target: {
|
|
41
|
+
value: 'quentin@cozycloud.cc'
|
|
42
|
+
}
|
|
45
43
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
});
|
|
45
|
+
act(function () {
|
|
46
|
+
fireEvent.keyPress(root.getByPlaceholderText('Add contacts or groups'), {
|
|
47
|
+
key: 'Enter',
|
|
48
|
+
code: 'Enter',
|
|
49
|
+
charCode: 13
|
|
52
50
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
51
|
+
});
|
|
52
|
+
act(function () {
|
|
53
|
+
fireEvent.click(root.getByRole('button', {
|
|
54
|
+
name: 'Send'
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
|
+
_context.next = 8;
|
|
58
|
+
return waitFor(function () {
|
|
59
|
+
expect(onShare).toHaveBeenCalledWith({
|
|
60
|
+
description: props.sharingDesc,
|
|
61
|
+
document: props.document,
|
|
62
|
+
openSharing: true,
|
|
63
|
+
readOnlyRecipients: [],
|
|
64
|
+
recipients: [{
|
|
65
|
+
email: 'quentin@cozycloud.cc'
|
|
66
|
+
}]
|
|
69
67
|
});
|
|
68
|
+
});
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
70
|
+
case 8:
|
|
71
|
+
case "end":
|
|
72
|
+
return _context.stop();
|
|
75
73
|
}
|
|
76
74
|
}, _callee);
|
|
77
75
|
})));
|