diff --git a/src/server/static-react/src/components/query/QueryForm.tsx b/src/server/static-react/src/components/query/QueryForm.tsx index 7bcea1df..ace3eac4 100644 --- a/src/server/static-react/src/components/query/QueryForm.tsx +++ b/src/server/static-react/src/components/query/QueryForm.tsx @@ -87,6 +87,7 @@ function QueryForm({ value={queryState?.selectedSchema || ''} onChange={handleSchemaChange} options={buildSchemaOptions(approvedSchemas, orgNames)} + config={{ loading: schemasLoading }} /> diff --git a/src/server/static-react/src/test/components/query/QueryForm.test.tsx b/src/server/static-react/src/test/components/query/QueryForm.test.tsx index b61c875c..829061c8 100644 --- a/src/server/static-react/src/test/components/query/QueryForm.test.tsx +++ b/src/server/static-react/src/test/components/query/QueryForm.test.tsx @@ -93,8 +93,9 @@ describe('QueryForm Component', () => { mockProps.schemasLoading = true; renderWithRedux(, { preloadedState: createAuthenticatedState() }); - // The SelectField component should handle loading state - expect(screen.getByRole('combobox')).toBeInTheDocument(); + // SelectField renders a loading indicator (no combobox) while schemasLoading is true + expect(screen.getByText('Loading...')).toBeInTheDocument(); + expect(screen.queryByRole('combobox')).not.toBeInTheDocument(); }); it('should apply custom className', () => {