diff --git a/i18n/en-US.properties b/i18n/en-US.properties
index 6b4f227190..4445cc0ddc 100644
--- a/i18n/en-US.properties
+++ b/i18n/en-US.properties
@@ -346,7 +346,7 @@ be.contentSidebar.addTask.general.description = Assignees will be responsible fo
be.contentSidebar.addTask.general.title = Create General Task
# Default message for Box AI clear button in sidebar header
be.contentSidebar.boxAI.clear = Clear
-# Tooltip text for clear button for Box AI in sidebae header
+# Tooltip text for clear button for Box AI in sidebar header
be.contentSidebar.boxAI.clearConversationTooltip = Clear conversation
# body for first-time user experience tooltip shown to new users of Box Sign
be.contentSidebar.boxSignFtuxBody = Sign documents or send signature requests, right from where your content lives
diff --git a/src/elements/content-sidebar/__tests__/BoxAISidebar.test.tsx b/src/elements/content-sidebar/__tests__/BoxAISidebar.test.tsx
index 4756bdb295..841cdbe887 100644
--- a/src/elements/content-sidebar/__tests__/BoxAISidebar.test.tsx
+++ b/src/elements/content-sidebar/__tests__/BoxAISidebar.test.tsx
@@ -2,72 +2,73 @@ import React from 'react';
import { userEvent } from '@testing-library/user-event';
import { render, screen } from '../../../test-utils/testing-library';
import BoxAISidebar, { BoxAISidebarProps } from '../BoxAISidebar';
-import messages from "../../common/content-answers/messages";
jest.mock('@box/box-ai-agent-selector', () => ({
...jest.requireActual('@box/box-ai-agent-selector'),
- BoxAiAgentSelectorWithApi: () =>
+ BoxAiAgentSelectorWithApi: () => ,
}));
const mockOnClearAction = jest.fn();
jest.mock('@box/box-ai-content-answers', () => ({
...jest.requireActual('@box/box-ai-content-answers'),
- withApiWrapper: Component => props => (),
+ withApiWrapper: Component => props => (
+
+ ),
}));
describe('elements/content-sidebar/BoxAISidebar', () => {
const mockProps = {
contentName: 'testName.txt',
cache: { encodedSession: '', questions: [] },
- createSessionRequest: jest.fn(()=> ({ encodedSession: '1234' })),
+ createSessionRequest: jest.fn(() => ({ encodedSession: '1234' })),
elementId: '123',
fetchTimeout: {},
fileExtension: 'txt',
fileID: '123',
getAgentConfig: jest.fn(),
- getAIStudioAgents: jest.fn(() => ([
+ getAIStudioAgents: jest.fn(() => [
{
id: null,
- name: "Default agent",
+ name: 'Default agent',
isSelected: true,
},
{
- id: "special",
- name: "Special agent",
+ id: 'special',
+ name: 'Special agent',
isSelected: false,
},
- ])),
+ ]),
getAnswer: jest.fn(),
getAnswerStreaming: jest.fn(),
getSuggestedQuestions: jest.fn(),
@@ -81,7 +82,7 @@ describe('elements/content-sidebar/BoxAISidebar', () => {
isResetChatEnabled: true,
isStopResponseEnabled: true,
isStreamingEnabled: true,
- userInfo: { name: 'Test', avatarUrl: undefined},
+ userInfo: { name: 'Test', avatarUrl: undefined },
recordAction: jest.fn(),
setCacheValue: jest.fn(),
} as unknown as BoxAISidebarProps;
@@ -98,7 +99,6 @@ describe('elements/content-sidebar/BoxAISidebar', () => {
test('should render title', async () => {
await renderComponent();
-
expect(screen.getByRole('heading', { level: 3, name: 'Box AI' })).toBeInTheDocument();
});
@@ -150,7 +150,7 @@ describe('elements/content-sidebar/BoxAISidebar', () => {
test('should not set questions that are in progress', async () => {
await renderComponent({
- cache: {
+ cache: {
encodedSession: '1234',
questions: [
{
@@ -162,9 +162,9 @@ describe('elements/content-sidebar/BoxAISidebar', () => {
error: 'general',
isCompleted: false,
prompt: 'not completed question',
- }
- ]
- }
+ },
+ ],
+ },
});
expect(screen.getByText('completed question')).toBeInTheDocument();
diff --git a/src/elements/content-sidebar/messages.js b/src/elements/content-sidebar/messages.js
index ac4576b615..3362676675 100644
--- a/src/elements/content-sidebar/messages.js
+++ b/src/elements/content-sidebar/messages.js
@@ -39,7 +39,7 @@ const messages = defineMessages({
},
boxAISidebarClearConversationTooltip: {
id: 'be.contentSidebar.boxAI.clearConversationTooltip',
- description: 'Tooltip text for clear button for Box AI in sidebae header',
+ description: 'Tooltip text for clear button for Box AI in sidebar header',
defaultMessage: 'Clear conversation',
},
boxSignFtuxBody: {