ATLAS-5347: Atlas React UI: Skeleton loader stuck indefinitely in Administration Audit tab when expanding Purge/Auto-Purge entity details - #700
Conversation
| @@ -337,7 +337,7 @@ describe('AttributeProperties', () => { | |||
| </TestWrapper> | |||
| ); | |||
|
|
|||
There was a problem hiding this comment.
- Audit mode + undefined loading + empty Redux entityData (core bug path)
it('should not render skeleton in auditDetails mode when loading is undefined', () => {
mockUseSelector.mockImplementation((selector: any) =>
selector({ entity: { entityData: {} } })
);
render(
);
expect(screen.queryByTestId('skeleton-loader')).not.toBeInTheDocument();
expect(screen.getByText('Technical Properties')).toBeInTheDocument();
});
- Audit mode + explicit loading still shows skeleton (negative case)
it('should render skeleton in auditDetails mode when loading is true', () => {
render(
);
expect(screen.getByTestId('skeleton-loader')).toBeInTheDocument();
});
- AuditResults should assert loading={false} is passed
The current mock only checks auditResultGuid:
AuditResults.test.tsx
Lines 113-117
jest.mock('@views/DetailPage/EntityDetailTabs/AuditsTab', () => ({
__esModule: true,
default: ({ auditResultGuid }: any) => (
)
}));
Extend the mock to expose data-loading={loading} and assert it in the purge modal test.
There was a problem hiding this comment.
Done. I have added the requested test cases in AttributeProperties.test.tsx for both the core bug path and negative loading case, and extended the <AuditsTab /> mock in AuditResults.test.tsx to assert the loading={false} attribute.
…inistration Audit tab when expanding Purge/Auto-Purge entity details
…inistration Audit tab when expanding Purge/Auto-Purge entity details



What changes were proposed in this pull request?
ATLAS-5347: Fix Skeleton Loader stuck indefinitely in Administration Audit tab for Purge operations
When expanding the details for
PURGEorAUTO_PURGEoperations in the React UI Administration Audits tab, the skeleton loader would get stuck spinning indefinitely.This patch fixes the issue by:
loading={false}to<AuditsTab />withinAuditResults.tsx.AttributeProperties.tsxto strictly check forloading === truerather than defaulting to the skeleton loader whenloadingis undefined.AttributeProperties.test.tsxto match the new strict conditional rendering logic.How was this patch tested?
PURGEandAUTO_PURGEoperations in the Administration Audits UI successfully loads the data without freezing the skeleton loader.AttributeProperties.test.tsx) to verify that the loader disappears correctly when entity data is available andloadingis not explicitly set totrue.