Skip to content

Commit 92238e4

Browse files
committed
update naming of tests
1 parent 319629f commit 92238e4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/gen-ai/frontend/src/app/Chatbot/hooks/__tests__/useSourceManagement.rag-auto-enable.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('useSourceManagement - RAG Auto-Enable', () => {
8888
});
8989
};
9090

91-
it('should signal RAG auto-enable (autoEnableRag=true) after a successful file upload', async () => {
91+
it('should set autoEnableRag to true after a successful file upload', async () => {
9292
const mockOnFileUploadComplete = jest.fn();
9393
const { result, rerender } = renderHookWithLoadingState(useSourceManagement, {
9494
onShowSuccessAlert: mockOnShowSuccessAlert,
@@ -105,7 +105,7 @@ describe('useSourceManagement - RAG Auto-Enable', () => {
105105
expect(mockOnShowSuccessAlert).toHaveBeenCalled();
106106
});
107107

108-
it('should signal RAG auto-enable even when the page initially had files', async () => {
108+
it('should set autoEnableRag to true even when files already existed before the upload', async () => {
109109
const mockOnFileUploadComplete = jest.fn();
110110
const existingFile = { id: 'existing-file' } as unknown as FileModel;
111111

@@ -124,7 +124,7 @@ describe('useSourceManagement - RAG Auto-Enable', () => {
124124
expect(mockOnShowSuccessAlert).toHaveBeenCalled();
125125
});
126126

127-
it('should signal RAG auto-enable again after autoEnableRag is reset', async () => {
127+
it('should set autoEnableRag to true again after it has been reset', async () => {
128128
const mockOnFileUploadComplete = jest.fn();
129129
const { result, rerender } = renderHookWithLoadingState(useSourceManagement, {
130130
onShowSuccessAlert: mockOnShowSuccessAlert,
@@ -155,7 +155,7 @@ describe('useSourceManagement - RAG Auto-Enable', () => {
155155
expect(result.current.autoEnableRag).toBe(true);
156156
});
157157

158-
it('should not signal RAG auto-enable if all uploads fail', async () => {
158+
it('should not set autoEnableRag if all uploads fail', async () => {
159159
mockUploadFile.mockResolvedValue({
160160
success: false,
161161
error: 'Upload failed',

0 commit comments

Comments
 (0)