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
|
@@ -74,50 +74,46 @@ describe('ShareDialogTwoStepsConfirmationContainer', function () {
|
|
|
74
74
|
var _deferablePromise, promise, resolve, props, _setup2, getByText;
|
|
75
75
|
|
|
76
76
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
77
|
-
while (1) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
78
|
+
case 0:
|
|
79
|
+
_deferablePromise = deferablePromise(), promise = _deferablePromise.promise, resolve = _deferablePromise.resolve;
|
|
80
|
+
props = _objectSpread(_objectSpread({}, getMockProps()), {}, {
|
|
81
|
+
twoStepsConfirmationMethods: {
|
|
82
|
+
getRecipientsToBeConfirmed: jest.fn(function () {
|
|
83
|
+
return promise;
|
|
84
|
+
}),
|
|
85
|
+
rejectRecipient: jest.fn()
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
_setup2 = setup(props), getByText = _setup2.getByText;
|
|
89
|
+
expect(getByText('Loading in progress')).toBeTruthy();
|
|
90
|
+
_context2.next = 6;
|
|
91
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
92
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
93
|
+
while (1) switch (_context.prev = _context.next) {
|
|
94
|
+
case 0:
|
|
95
|
+
resolve([{
|
|
96
|
+
name: recipientBob.public_name,
|
|
97
|
+
id: 'SOME_ID',
|
|
98
|
+
index: 0,
|
|
99
|
+
email: recipientBob.email
|
|
100
|
+
}]);
|
|
101
|
+
_context.next = 3;
|
|
84
102
|
return promise;
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
|
|
104
|
+
case 3:
|
|
105
|
+
case "end":
|
|
106
|
+
return _context.stop();
|
|
87
107
|
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
resolve([{
|
|
98
|
-
name: recipientBob.public_name,
|
|
99
|
-
id: 'SOME_ID',
|
|
100
|
-
index: 0,
|
|
101
|
-
email: recipientBob.email
|
|
102
|
-
}]);
|
|
103
|
-
_context.next = 3;
|
|
104
|
-
return promise;
|
|
105
|
-
|
|
106
|
-
case 3:
|
|
107
|
-
case "end":
|
|
108
|
-
return _context.stop();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, _callee);
|
|
112
|
-
})));
|
|
113
|
-
|
|
114
|
-
case 6:
|
|
115
|
-
expect(getByText('Verify')).toBeTruthy();
|
|
116
|
-
|
|
117
|
-
case 7:
|
|
118
|
-
case "end":
|
|
119
|
-
return _context2.stop();
|
|
120
|
-
}
|
|
108
|
+
}, _callee);
|
|
109
|
+
})));
|
|
110
|
+
|
|
111
|
+
case 6:
|
|
112
|
+
expect(getByText('Verify')).toBeTruthy();
|
|
113
|
+
|
|
114
|
+
case 7:
|
|
115
|
+
case "end":
|
|
116
|
+
return _context2.stop();
|
|
121
117
|
}
|
|
122
118
|
}, _callee2);
|
|
123
119
|
})));
|
|
@@ -125,49 +121,45 @@ describe('ShareDialogTwoStepsConfirmationContainer', function () {
|
|
|
125
121
|
var _deferablePromise2, promise, resolve, props, _setup3, getAllByText;
|
|
126
122
|
|
|
127
123
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
128
|
-
while (1) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
124
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
125
|
+
case 0:
|
|
126
|
+
_deferablePromise2 = deferablePromise(), promise = _deferablePromise2.promise, resolve = _deferablePromise2.resolve;
|
|
127
|
+
props = _objectSpread(_objectSpread({}, getMockProps()), {}, {
|
|
128
|
+
twoStepsConfirmationMethods: {
|
|
129
|
+
getRecipientsToBeConfirmed: jest.fn(function () {
|
|
130
|
+
return promise;
|
|
131
|
+
}),
|
|
132
|
+
rejectRecipient: jest.fn()
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
_setup3 = setup(props), getAllByText = _setup3.getAllByText;
|
|
136
|
+
_context4.next = 5;
|
|
137
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
138
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
139
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
140
|
+
case 0:
|
|
141
|
+
resolve([{
|
|
142
|
+
name: recipientBob.public_name,
|
|
143
|
+
id: 'SOME_ID',
|
|
144
|
+
index: 0,
|
|
145
|
+
email: recipientBob.email
|
|
146
|
+
}]);
|
|
147
|
+
_context3.next = 3;
|
|
135
148
|
return promise;
|
|
136
|
-
|
|
137
|
-
|
|
149
|
+
|
|
150
|
+
case 3:
|
|
151
|
+
case "end":
|
|
152
|
+
return _context3.stop();
|
|
138
153
|
}
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
name: recipientBob.public_name,
|
|
149
|
-
id: 'SOME_ID',
|
|
150
|
-
index: 0,
|
|
151
|
-
email: recipientBob.email
|
|
152
|
-
}]);
|
|
153
|
-
_context3.next = 3;
|
|
154
|
-
return promise;
|
|
155
|
-
|
|
156
|
-
case 3:
|
|
157
|
-
case "end":
|
|
158
|
-
return _context3.stop();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}, _callee3);
|
|
162
|
-
})));
|
|
163
|
-
|
|
164
|
-
case 5:
|
|
165
|
-
expect(getAllByText('Verify')).toHaveLength(1);
|
|
166
|
-
|
|
167
|
-
case 6:
|
|
168
|
-
case "end":
|
|
169
|
-
return _context4.stop();
|
|
170
|
-
}
|
|
154
|
+
}, _callee3);
|
|
155
|
+
})));
|
|
156
|
+
|
|
157
|
+
case 5:
|
|
158
|
+
expect(getAllByText('Verify')).toHaveLength(1);
|
|
159
|
+
|
|
160
|
+
case 6:
|
|
161
|
+
case "end":
|
|
162
|
+
return _context4.stop();
|
|
171
163
|
}
|
|
172
164
|
}, _callee4);
|
|
173
165
|
})));
|
|
@@ -175,54 +167,50 @@ describe('ShareDialogTwoStepsConfirmationContainer', function () {
|
|
|
175
167
|
var _deferablePromise3, promise, resolve, props, _setup4, getAllByText;
|
|
176
168
|
|
|
177
169
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
178
|
-
while (1) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
170
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
171
|
+
case 0:
|
|
172
|
+
_deferablePromise3 = deferablePromise(), promise = _deferablePromise3.promise, resolve = _deferablePromise3.resolve;
|
|
173
|
+
props = _objectSpread(_objectSpread({}, getMockProps()), {}, {
|
|
174
|
+
twoStepsConfirmationMethods: {
|
|
175
|
+
getRecipientsToBeConfirmed: jest.fn(function () {
|
|
176
|
+
return promise;
|
|
177
|
+
}),
|
|
178
|
+
rejectRecipient: jest.fn()
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
_setup4 = setup(props), getAllByText = _setup4.getAllByText;
|
|
182
|
+
_context6.next = 5;
|
|
183
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
184
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
185
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
186
|
+
case 0:
|
|
187
|
+
resolve([{
|
|
188
|
+
name: recipientBob.public_name,
|
|
189
|
+
id: 'SOME_ID',
|
|
190
|
+
index: 0,
|
|
191
|
+
email: recipientBob.email
|
|
192
|
+
}, {
|
|
193
|
+
name: recipientClaude.public_name,
|
|
194
|
+
id: 'SOME_OTHER_ID',
|
|
195
|
+
index: 1,
|
|
196
|
+
email: recipientClaude.email
|
|
197
|
+
}]);
|
|
198
|
+
_context5.next = 3;
|
|
185
199
|
return promise;
|
|
186
|
-
|
|
187
|
-
|
|
200
|
+
|
|
201
|
+
case 3:
|
|
202
|
+
case "end":
|
|
203
|
+
return _context5.stop();
|
|
188
204
|
}
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
name: recipientBob.public_name,
|
|
199
|
-
id: 'SOME_ID',
|
|
200
|
-
index: 0,
|
|
201
|
-
email: recipientBob.email
|
|
202
|
-
}, {
|
|
203
|
-
name: recipientClaude.public_name,
|
|
204
|
-
id: 'SOME_OTHER_ID',
|
|
205
|
-
index: 1,
|
|
206
|
-
email: recipientClaude.email
|
|
207
|
-
}]);
|
|
208
|
-
_context5.next = 3;
|
|
209
|
-
return promise;
|
|
210
|
-
|
|
211
|
-
case 3:
|
|
212
|
-
case "end":
|
|
213
|
-
return _context5.stop();
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, _callee5);
|
|
217
|
-
})));
|
|
218
|
-
|
|
219
|
-
case 5:
|
|
220
|
-
expect(getAllByText('Verify')).toHaveLength(2);
|
|
221
|
-
|
|
222
|
-
case 6:
|
|
223
|
-
case "end":
|
|
224
|
-
return _context6.stop();
|
|
225
|
-
}
|
|
205
|
+
}, _callee5);
|
|
206
|
+
})));
|
|
207
|
+
|
|
208
|
+
case 5:
|
|
209
|
+
expect(getAllByText('Verify')).toHaveLength(2);
|
|
210
|
+
|
|
211
|
+
case 6:
|
|
212
|
+
case "end":
|
|
213
|
+
return _context6.stop();
|
|
226
214
|
}
|
|
227
215
|
}, _callee6);
|
|
228
216
|
})));
|
|
@@ -230,44 +218,40 @@ describe('ShareDialogTwoStepsConfirmationContainer', function () {
|
|
|
230
218
|
var _deferablePromise4, promise, resolve, props, _setup5, queryByText;
|
|
231
219
|
|
|
232
220
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
233
|
-
while (1) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
221
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
222
|
+
case 0:
|
|
223
|
+
_deferablePromise4 = deferablePromise(), promise = _deferablePromise4.promise, resolve = _deferablePromise4.resolve;
|
|
224
|
+
props = _objectSpread(_objectSpread({}, getMockProps()), {}, {
|
|
225
|
+
twoStepsConfirmationMethods: {
|
|
226
|
+
getRecipientsToBeConfirmed: jest.fn(function () {
|
|
227
|
+
return promise;
|
|
228
|
+
}),
|
|
229
|
+
rejectRecipient: jest.fn()
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
_setup5 = setup(props), queryByText = _setup5.queryByText;
|
|
233
|
+
_context8.next = 5;
|
|
234
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
235
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
236
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
237
|
+
case 0:
|
|
238
|
+
resolve([]);
|
|
239
|
+
_context7.next = 3;
|
|
240
240
|
return promise;
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
|
|
242
|
+
case 3:
|
|
243
|
+
case "end":
|
|
244
|
+
return _context7.stop();
|
|
243
245
|
}
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
_context7.next = 3;
|
|
254
|
-
return promise;
|
|
255
|
-
|
|
256
|
-
case 3:
|
|
257
|
-
case "end":
|
|
258
|
-
return _context7.stop();
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}, _callee7);
|
|
262
|
-
})));
|
|
263
|
-
|
|
264
|
-
case 5:
|
|
265
|
-
expect(queryByText('Verify')).not.toBeInTheDocument();
|
|
266
|
-
|
|
267
|
-
case 6:
|
|
268
|
-
case "end":
|
|
269
|
-
return _context8.stop();
|
|
270
|
-
}
|
|
246
|
+
}, _callee7);
|
|
247
|
+
})));
|
|
248
|
+
|
|
249
|
+
case 5:
|
|
250
|
+
expect(queryByText('Verify')).not.toBeInTheDocument();
|
|
251
|
+
|
|
252
|
+
case 6:
|
|
253
|
+
case "end":
|
|
254
|
+
return _context8.stop();
|
|
271
255
|
}
|
|
272
256
|
}, _callee8);
|
|
273
257
|
})));
|
|
@@ -275,109 +259,99 @@ describe('ShareDialogTwoStepsConfirmationContainer', function () {
|
|
|
275
259
|
var _deferablePromise5, promise, resolve, rejectRecipient, props, _setup6, getByText, verifyButton, rejectButton, confirmRejectButton;
|
|
276
260
|
|
|
277
261
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
278
|
-
while (1) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
262
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
263
|
+
case 0:
|
|
264
|
+
_deferablePromise5 = deferablePromise(), promise = _deferablePromise5.promise, resolve = _deferablePromise5.resolve;
|
|
265
|
+
rejectRecipient = jest.fn(function () {
|
|
266
|
+
return Promise.resolve();
|
|
267
|
+
});
|
|
268
|
+
props = _objectSpread(_objectSpread({}, getMockProps()), {}, {
|
|
269
|
+
twoStepsConfirmationMethods: {
|
|
270
|
+
getRecipientsToBeConfirmed: jest.fn(function () {
|
|
271
|
+
return promise;
|
|
272
|
+
}),
|
|
273
|
+
rejectRecipient: rejectRecipient,
|
|
274
|
+
recipientConfirmationDialogContent: CozyPassFingerprintDialogContent
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
_setup6 = setup(props), getByText = _setup6.getByText;
|
|
278
|
+
_context13.next = 6;
|
|
279
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
280
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
281
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
282
|
+
case 0:
|
|
283
|
+
resolve([{
|
|
284
|
+
name: recipientBob.public_name,
|
|
285
|
+
id: 'SOME_ID',
|
|
286
|
+
index: 0,
|
|
287
|
+
email: recipientBob.email,
|
|
288
|
+
fingerprintPhrase: 'SOME_FINGERPRINT_PHRASE'
|
|
289
|
+
}]);
|
|
290
|
+
_context9.next = 3;
|
|
288
291
|
return promise;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
+
|
|
293
|
+
case 3:
|
|
294
|
+
case "end":
|
|
295
|
+
return _context9.stop();
|
|
292
296
|
}
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
}, _callee11);
|
|
353
|
-
})));
|
|
354
|
-
|
|
355
|
-
case 12:
|
|
356
|
-
expect(getByText("Do you really want to reject contact ".concat(recipientBob.public_name, " (").concat(recipientBob.email, ")?"))).toBeTruthy();
|
|
357
|
-
confirmRejectButton = getByText('Reject');
|
|
358
|
-
_context13.next = 16;
|
|
359
|
-
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
360
|
-
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
361
|
-
while (1) {
|
|
362
|
-
switch (_context12.prev = _context12.next) {
|
|
363
|
-
case 0:
|
|
364
|
-
return _context12.abrupt("return", fireEvent.click(confirmRejectButton));
|
|
365
|
-
|
|
366
|
-
case 1:
|
|
367
|
-
case "end":
|
|
368
|
-
return _context12.stop();
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}, _callee12);
|
|
372
|
-
})));
|
|
373
|
-
|
|
374
|
-
case 16:
|
|
375
|
-
expect(rejectRecipient).toBeCalled();
|
|
376
|
-
|
|
377
|
-
case 17:
|
|
378
|
-
case "end":
|
|
379
|
-
return _context13.stop();
|
|
380
|
-
}
|
|
297
|
+
}, _callee9);
|
|
298
|
+
})));
|
|
299
|
+
|
|
300
|
+
case 6:
|
|
301
|
+
verifyButton = getByText('Verify');
|
|
302
|
+
_context13.next = 9;
|
|
303
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
304
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
305
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
306
|
+
case 0:
|
|
307
|
+
return _context10.abrupt("return", fireEvent.click(verifyButton));
|
|
308
|
+
|
|
309
|
+
case 1:
|
|
310
|
+
case "end":
|
|
311
|
+
return _context10.stop();
|
|
312
|
+
}
|
|
313
|
+
}, _callee10);
|
|
314
|
+
})));
|
|
315
|
+
|
|
316
|
+
case 9:
|
|
317
|
+
rejectButton = getByText('Reject');
|
|
318
|
+
_context13.next = 12;
|
|
319
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
320
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
321
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
322
|
+
case 0:
|
|
323
|
+
return _context11.abrupt("return", fireEvent.click(rejectButton));
|
|
324
|
+
|
|
325
|
+
case 1:
|
|
326
|
+
case "end":
|
|
327
|
+
return _context11.stop();
|
|
328
|
+
}
|
|
329
|
+
}, _callee11);
|
|
330
|
+
})));
|
|
331
|
+
|
|
332
|
+
case 12:
|
|
333
|
+
expect(getByText("Do you really want to reject contact ".concat(recipientBob.public_name, " (").concat(recipientBob.email, ")?"))).toBeTruthy();
|
|
334
|
+
confirmRejectButton = getByText('Reject');
|
|
335
|
+
_context13.next = 16;
|
|
336
|
+
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
337
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
338
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
339
|
+
case 0:
|
|
340
|
+
return _context12.abrupt("return", fireEvent.click(confirmRejectButton));
|
|
341
|
+
|
|
342
|
+
case 1:
|
|
343
|
+
case "end":
|
|
344
|
+
return _context12.stop();
|
|
345
|
+
}
|
|
346
|
+
}, _callee12);
|
|
347
|
+
})));
|
|
348
|
+
|
|
349
|
+
case 16:
|
|
350
|
+
expect(rejectRecipient).toBeCalled();
|
|
351
|
+
|
|
352
|
+
case 17:
|
|
353
|
+
case "end":
|
|
354
|
+
return _context13.stop();
|
|
381
355
|
}
|
|
382
356
|
}, _callee13);
|
|
383
357
|
})));
|
|
@@ -3,8 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
5
5
|
var styles = {
|
|
6
|
-
"CozyTheme--inverted": "badge__CozyTheme--inverted___1vv9l",
|
|
7
|
-
"CozyTheme--normal": "badge__CozyTheme--normal___2pjsD",
|
|
8
6
|
"shared-badge": "badge__shared-badge___2QYc_",
|
|
9
7
|
"--small": "badge__--small___3i2p8",
|
|
10
8
|
"shared-badge-icon": "badge__shared-badge-icon___kngsy",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
palette=json('settings/palette.json', { hash: true })
|
|
2
2
|
|
|
3
3
|
.shared-badge
|
|
4
4
|
display flex
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
background-clip padding-box
|
|
9
9
|
|
|
10
10
|
&.--small
|
|
11
|
-
border .125rem solid
|
|
11
|
+
border .125rem solid
|
|
12
|
+
border-color: palette['white']
|
|
12
13
|
width 1.5rem
|
|
13
14
|
height 1.5rem
|
|
14
15
|
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
height .75rem
|
|
18
19
|
|
|
19
20
|
&.--xsmall
|
|
20
|
-
border .0625rem solid
|
|
21
|
+
border .0625rem solid
|
|
22
|
+
border-color: palette['white']
|
|
21
23
|
width .75rem
|
|
22
24
|
height .75rem
|
|
23
25
|
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
height .375rem
|
|
27
29
|
|
|
28
30
|
&.--by-me
|
|
29
|
-
background-color
|
|
31
|
+
background-color: palette['emerald']
|
|
30
32
|
|
|
31
33
|
&.--with-me
|
|
32
|
-
background-color
|
|
34
|
+
background-color: palette['portage']
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
palette=json('settings/palette.json', { hash: true })
|
|
3
2
|
.coz-btn-shared
|
|
4
|
-
border-color
|
|
5
|
-
background-color
|
|
6
|
-
color
|
|
3
|
+
border-color: palette['emerald']
|
|
4
|
+
background-color: palette['emerald']
|
|
5
|
+
color: palette['white']
|
|
7
6
|
transition all .2s ease-out
|
|
8
7
|
|
|
9
8
|
&:focus
|
|
10
9
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
11
|
-
border-color
|
|
12
|
-
background-color
|
|
10
|
+
border-color: palette['malachite']
|
|
11
|
+
background-color: palette['malachite']
|
|
13
12
|
|
|
14
13
|
.coz-btn-sharedWithMe
|
|
15
|
-
border-color
|
|
16
|
-
background-color
|
|
17
|
-
color
|
|
14
|
+
border-color: palette['lightishPurple']
|
|
15
|
+
background-color: palette['lightishPurple']
|
|
16
|
+
color: palette['white']
|
|
18
17
|
transition all .2s ease-out
|
|
19
18
|
|
|
20
19
|
&:focus
|
|
21
20
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
22
|
-
border-color
|
|
23
|
-
background-color
|
|
21
|
+
border-color: palette['barney']
|
|
22
|
+
background-color: palette['barney']
|