Skip to content

Commit 949dfb8

Browse files
committed
fix: test and package
1 parent 265a540 commit 949dfb8

File tree

3 files changed

+36
-47
lines changed

3 files changed

+36
-47
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@
124124
"@babel/preset-typescript": "^7.24.7",
125125
"@babel/template": "^7.24.7",
126126
"@babel/types": "^7.24.7",
127-
"@box/blueprint-web": "^12.104.1",
128-
"@box/blueprint-web-assets": "4.88.2",
127+
"@box/blueprint-web": "^12.112.3",
128+
"@box/blueprint-web-assets": "4.91.3",
129129
"@box/box-ai-agent-selector": "^0.53.0",
130130
"@box/box-ai-content-answers": "^0.139.0",
131131
"@box/box-item-type-selector": "^0.73.1",
132132
"@box/cldr-data": "^34.2.0",
133133
"@box/combobox-with-api": "^1.18.0",
134-
"@box/copy-input": "^1.5.3",
134+
"@box/copy-input": "^1.22.3",
135135
"@box/frontend": "^11.0.1",
136136
"@box/item-icon": "^0.27.1",
137137
"@box/languages": "^1.0.0",
@@ -141,7 +141,7 @@
141141
"@box/react-virtualized": "^9.22.3-rc-box.10",
142142
"@box/types": "^0.2.1",
143143
"@box/unified-share-modal": "^1.36.1",
144-
"@box/user-selector": "^1.23.25",
144+
"@box/user-selector": "^1.55.3",
145145
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
146146
"@chromatic-com/storybook": "^4.0.1",
147147
"@commitlint/cli": "^19.8.0",
@@ -296,22 +296,22 @@
296296
"webpack-dev-server": "^5.2.1"
297297
},
298298
"peerDependencies": {
299-
"@box/blueprint-web": "^12.104.1",
300-
"@box/blueprint-web-assets": "4.88.2",
299+
"@box/blueprint-web": "^12.112.3",
300+
"@box/blueprint-web-assets": "4.91.3",
301301
"@box/box-ai-agent-selector": "^0.53.0",
302302
"@box/box-ai-content-answers": "^0.139.0",
303303
"@box/box-item-type-selector": "^0.73.1",
304304
"@box/cldr-data": ">=34.2.0",
305305
"@box/combobox-with-api": "^1.18.0",
306-
"@box/copy-input": "^1.5.3",
306+
"@box/copy-input": "^1.22.3",
307307
"@box/item-icon": "^0.27.1",
308308
"@box/metadata-editor": "^1.18.0",
309309
"@box/metadata-filter": "^1.41.3",
310310
"@box/metadata-view": "^1.10.0",
311311
"@box/react-virtualized": "^9.22.3-rc-box.10",
312312
"@box/types": "^0.2.1",
313313
"@box/unified-share-modal": "^1.36.1",
314-
"@box/user-selector": "^1.23.25",
314+
"@box/user-selector": "^1.55.3",
315315
"@hapi/address": "^2.1.4",
316316
"@tanstack/react-virtual": "^3.13.12",
317317
"axios": "^0.30.0",

src/elements/content-sharing/__tests__/useInvites.test.js

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook, act } from '@testing-library/react';
1+
import { renderHook } from '@testing-library/react';
22
import useInvites from '../hooks/useInvites';
33
import API from '../../../api';
44

@@ -51,9 +51,7 @@ describe('useInvites hook', () => {
5151
}),
5252
);
5353

54-
await act(async () => {
55-
await result.current({ users: [{ email: 'user@example.com', role: 'editor' }] });
56-
});
54+
await result.current({ users: [{ email: 'user@example.com', role: 'editor' }] });
5755

5856
expect(mockHandleSuccess).toHaveBeenCalledWith({ id: 'collab123', role: 'editor' });
5957
expect(mockTransformResponse).toHaveBeenCalledWith({ id: 'collab123', role: 'editor' });
@@ -69,10 +67,7 @@ describe('useInvites hook', () => {
6967
}),
7068
);
7169

72-
await act(async () => {
73-
await result.current({ users: [{ email: 'fail@example.com', role: 'editor' }] }).catch(() => {});
74-
});
75-
70+
await result.current({ users: [{ email: 'fail@example.com', role: 'editor' }] }).catch(() => {});
7671
expect(mockHandleError).toHaveBeenCalled();
7772
});
7873

@@ -85,11 +80,7 @@ describe('useInvites hook', () => {
8580
}),
8681
);
8782

88-
let actionResult;
89-
await act(async () => {
90-
actionResult = await result.current({ users: [{ email: 'user@example.com', role: 'editor' }] });
91-
});
92-
83+
const actionResult = await result.current({ users: [{ email: 'user@example.com', role: 'editor' }] });
9384
expect(actionResult).toEqual(null);
9485
expect(mockHandleSuccess).not.toHaveBeenCalled();
9586
expect(mockHandleError).not.toHaveBeenCalled();
@@ -108,11 +99,9 @@ describe('useInvites hook', () => {
10899
}),
109100
);
110101

111-
await act(async () => {
112-
await result.current({
113-
users: [{ email: 'user@example.com', role: 'editor' }],
114-
groups: [{ id: 'group123', role: 'viewer' }],
115-
});
102+
await result.current({
103+
users: [{ email: 'user@example.com', role: 'editor' }],
104+
groups: [{ id: 'group123', role: 'viewer' }],
116105
});
117106

118107
expect(mockHandleSuccess).toHaveBeenCalledTimes(2);

yarn.lock

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,24 +1419,24 @@
14191419
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
14201420
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
14211421

1422-
"@box/blueprint-web-assets@4.88.2":
1423-
version "4.88.2"
1424-
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.88.2.tgz#cb98f14dcd5a072d7c97be31030485cf9219478e"
1425-
integrity sha512-TAtiYWvudxj3i5GAa4NsiHzlF9WcIARBbp1dCxgwsFP652NEamo/3SH2wyhcc/5u1bJJLftxe5xsTv6a7dpj0w==
1422+
"@box/blueprint-web-assets@4.91.3":
1423+
version "4.91.3"
1424+
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.91.3.tgz#ddb0127d502e4bc8b42d6af73659f0daf970fecb"
1425+
integrity sha512-Wd9TTD8Z1XhXeMaLFJ7dOjVOc+lARXDiP5U8VdLDaWmb1+bGiYm9vNCzetrBmYAJac+QaQgW5yhYpr3qGhWAGw==
14261426

1427-
"@box/blueprint-web-assets@^4.89.0":
1428-
version "4.89.0"
1429-
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.89.0.tgz#fd19ea1e826b6af9db78fbddb89e052717e40f24"
1430-
integrity sha512-5pwvqUUJutlpVFjf8rZld0qegNwICyG1g63OEnhszVq+KqkMQPZJOWJ2rfK5Pr8SduH4ei5LQ3j6XkG8VJuFig==
1427+
"@box/blueprint-web-assets@^4.91.4":
1428+
version "4.91.4"
1429+
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.91.4.tgz#91372cf30a5705085294ad5caa521df365995f2f"
1430+
integrity sha512-MbECaQ8rmxrBGs+GmkwgK7pwtL621UFIl4Lx38cZjy6rRYFIi9gKaPFfJUTdxln2zc17z3hPqz+clHNzgPRocw==
14311431

1432-
"@box/blueprint-web@^12.104.1":
1433-
version "12.108.1"
1434-
resolved "https://registry.yarnpkg.com/@box/blueprint-web/-/blueprint-web-12.108.1.tgz#7760d6a3c0635a3a28e8c15881c1b799cbda5fff"
1435-
integrity sha512-v3jBIc7zP2oz7qG5cuALW67D0V+/4PdB8tRoeXs7OcFgwjTIRpx9pNg6pagmTTD/VSm6sCawbUl6oRQfowOQOQ==
1432+
"@box/blueprint-web@^12.112.3":
1433+
version "12.113.0"
1434+
resolved "https://registry.yarnpkg.com/@box/blueprint-web/-/blueprint-web-12.113.0.tgz#106cf61669d51f96995354331c0178da4716ba3e"
1435+
integrity sha512-eXcVLhQ6JCXPgjFJdPqNzKk+PCAvpRONcGyz50yhEkvobMgXS2qLigg06xcugFHdA714iv7ikUE2CsVXOjf4Ig==
14361436
dependencies:
14371437
"@ariakit/react" "0.4.15"
14381438
"@ariakit/react-core" "0.4.15"
1439-
"@box/blueprint-web-assets" "^4.89.0"
1439+
"@box/blueprint-web-assets" "^4.91.4"
14401440
"@internationalized/date" "^3.7.0"
14411441
"@radix-ui/react-accordion" "1.1.2"
14421442
"@radix-ui/react-checkbox" "1.0.4"
@@ -1493,10 +1493,10 @@
14931493
"@box/tree" "^1.18.1"
14941494
react-accessible-treeview "2.9.0"
14951495

1496-
"@box/copy-input@^1.5.3":
1497-
version "1.5.3"
1498-
resolved "https://registry.yarnpkg.com/@box/copy-input/-/copy-input-1.5.3.tgz#7eeffbdbc40a2f8660fa06c4b740f9d504c8ddc0"
1499-
integrity sha512-EpT+gcIzgyb2MNmAFSIfFq2bfKFDF+5yZldBmU0H/lwHQ5/uowb14cBEC7ZFc9IIkNz7aazEm+HmBikoGyZj1g==
1496+
"@box/copy-input@^1.22.3":
1497+
version "1.22.4"
1498+
resolved "https://registry.yarnpkg.com/@box/copy-input/-/copy-input-1.22.4.tgz#059236421f44bcc92abde3bc835abc27d48ebd1d"
1499+
integrity sha512-tdWB/Xz+kQe8xD0fT0NdbUhVStJ5AXwXTHEeJX58yawZ9IEwjpJcCHC2S8N8WPr2OT06foE2kFepFkXWaEoCNA==
15001500

15011501
"@box/frontend@^11.0.1":
15021502
version "11.0.1"
@@ -1559,10 +1559,10 @@
15591559
resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-1.36.2.tgz#4bcc326200a0d709b67c631b72b05cdd5d5a7f1e"
15601560
integrity sha512-ngcn9TjwtSarKLGGFSQCvKEm9eihO3Sp6B/wtcPOSLDGADq92ughbolabquoYZU6VpA0n7sy+B/k0OnHYek7hQ==
15611561

1562-
"@box/user-selector@^1.23.25":
1563-
version "1.23.25"
1564-
resolved "https://registry.yarnpkg.com/@box/user-selector/-/user-selector-1.23.25.tgz#95c9e56d67b4f313cce5891c3a0b51b6152d0cc2"
1565-
integrity sha512-QXQ+tAaRY0KQzUZWL0hbNcYAkePwFeTcmqRDZnaBo8s5i0SVVuGO6vUA/Kt9LGLAJirp1ZPks8ECSZmSVvJlVg==
1562+
"@box/user-selector@^1.55.3":
1563+
version "1.55.4"
1564+
resolved "https://registry.yarnpkg.com/@box/user-selector/-/user-selector-1.55.4.tgz#46a160cf3e962c8949ca15f0d27a746491ff36f0"
1565+
integrity sha512-osXAFRlCuRTuFMtRFHMZ8xxa7SNweE9MJm1XZJEC1Y104QFH14B+ubyuZpHhOZ3Cyi3OQlGXEur9KNqGOFtlPg==
15661566

15671567
"@bundled-es-modules/cookie@^2.0.1":
15681568
version "2.0.1"

0 commit comments

Comments
 (0)