diff --git a/src/components/ProgramRecord/ProgramRecord.jsx b/src/components/ProgramRecord/ProgramRecord.jsx index ae5923c1..bb881cdf 100644 --- a/src/components/ProgramRecord/ProgramRecord.jsx +++ b/src/components/ProgramRecord/ProgramRecord.jsx @@ -175,14 +175,14 @@ function ProgramRecord({ isPublic }) { ); - const renderNotFound = () => ( + const renderLoading = () => ( <> {!isPublic && renderBackButton()}

@@ -195,7 +195,7 @@ function ProgramRecord({ isPublic }) { } return renderProgramDetails(); } - return renderNotFound(); + return renderLoading(); }; return ( diff --git a/src/components/ProgramRecord/test/ProgramRecord.test.jsx b/src/components/ProgramRecord/test/ProgramRecord.test.jsx index 5c18c34d..d05ae908 100644 --- a/src/components/ProgramRecord/test/ProgramRecord.test.jsx +++ b/src/components/ProgramRecord/test/ProgramRecord.test.jsx @@ -78,12 +78,11 @@ describe('program-record', () => { expect(await screen.findByText('An error occurred attempting to retrieve your program records. Please try again later.')).toBeTruthy(); }); - it('renders not found message on unsuccessful request', async () => { + it('renders loading message on delay', async () => { const axiosMock = new MockAdapter(getAuthenticatedHttpClient()); axiosMock - .onGet(`${getConfig().CREDENTIALS_BASE_URL}/records/api/v1/program_records/test-id/?is_public=false`) - .reply(404, {}); + .onGet(`${getConfig().CREDENTIALS_BASE_URL}/records/api/v1/program_records/test-id/?is_public=false`); render(); - expect(await screen.findByText('The page you\'re looking for is unavailable or there\'s an error in the URL. Please check the URL and try again.')).toBeTruthy(); + expect(await screen.findByText('Loading...')).toBeTruthy(); }); });