box-ui-elements 25.1.1-beta.1 → 25.1.1-beta.2
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/dist/explorer.js +1 -1
- package/dist/openwith.js +1 -1
- package/dist/picker.js +1 -1
- package/dist/preview.js +1 -1
- package/dist/sharing.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/uploader.js +1 -1
- package/es/constants.js +1 -1
- package/package.json +1 -1
- package/src/features/classification/__tests__/Classification.test.tsx +18 -18
package/es/constants.js
CHANGED
|
@@ -237,7 +237,7 @@ export const CLIENT_NAME_CONTENT_SIDEBAR = 'ContentSidebar';
|
|
|
237
237
|
export const CLIENT_NAME_CONTENT_UPLOADER = 'ContentUploader';
|
|
238
238
|
export const CLIENT_NAME_FILE_PICKER = 'FilePicker';
|
|
239
239
|
export const CLIENT_NAME_FOLDER_PICKER = 'FolderPicker';
|
|
240
|
-
export const CLIENT_VERSION = '25.1.1-beta.
|
|
240
|
+
export const CLIENT_VERSION = '25.1.1-beta.2';
|
|
241
241
|
|
|
242
242
|
/* ---------------------- Statuses -------------------------- */
|
|
243
243
|
export const STATUS_PENDING = 'pending';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { render, screen } from '../../../test-utils/testing-library';
|
|
3
|
+
import { render, screen, waitFor } from '../../../test-utils/testing-library';
|
|
4
4
|
import Classification from '../Classification';
|
|
5
5
|
|
|
6
6
|
import messages from '../messages';
|
|
@@ -258,23 +258,23 @@ describe('features/classification/Classification', () => {
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
// Wait for the async component to load
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
await waitFor(() => {
|
|
262
|
+
const appliedByTitle = screen.getByText(messages.appliedByTitle.defaultMessage);
|
|
263
|
+
const appliedByDetails = screen.getByText('Box AI on January 15, 2024'); // expected text based on provided mocks
|
|
264
|
+
const reasonText = screen.getByText(aiClassificationReason.answer);
|
|
265
|
+
const citationsLabel = screen.queryByTestId('content-answers-references-label');
|
|
266
|
+
const citationElements = screen.getAllByTestId('content-answers-citation-status');
|
|
267
|
+
const modifiedByPlaintext = screen.queryByTestId('classification-modifiedby');
|
|
268
|
+
|
|
269
|
+
expect(appliedByTitle).toBeVisible();
|
|
270
|
+
expect(appliedByDetails).toBeVisible();
|
|
271
|
+
expect(reasonText).toBeVisible();
|
|
272
|
+
expect(citationsLabel).toBeVisible();
|
|
273
|
+
expect(citationElements).toHaveLength(expectedCitationsCount);
|
|
274
|
+
|
|
275
|
+
// Assert the plaintext version of modified by details is not rendered
|
|
276
|
+
expect(modifiedByPlaintext).not.toBeInTheDocument();
|
|
277
|
+
});
|
|
278
278
|
},
|
|
279
279
|
);
|
|
280
280
|
|