diff --git a/ui/apps/pmm/src/api/updates.ts b/ui/apps/pmm/src/api/updates.ts index 1f3f87aaf2e..7e6f701f962 100644 --- a/ui/apps/pmm/src/api/updates.ts +++ b/ui/apps/pmm/src/api/updates.ts @@ -1,4 +1,4 @@ -import { AxiosResponse } from 'axios'; +import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { GetChangeLogsResponse, GetUpdateStatusBody, @@ -11,9 +11,11 @@ import { import { api } from './api'; export const checkForUpdates = async ( - params: GetUpdatesParams = { force: false } + params: GetUpdatesParams = { force: false }, + config?: AxiosRequestConfig ) => { const res = await api.get('/server/updates', { + ...config, params, }); return res.data; diff --git a/ui/apps/pmm/src/components/footer/Footer.test.tsx b/ui/apps/pmm/src/components/footer/Footer.test.tsx index 8541f47d2fa..e28fc0eb112 100644 --- a/ui/apps/pmm/src/components/footer/Footer.test.tsx +++ b/ui/apps/pmm/src/components/footer/Footer.test.tsx @@ -20,6 +20,27 @@ describe('Footer', () => { expect('Last checked: 2024/07/30'); }); + it('hides the check date when no check has run', () => { + render( + wrapWithUpdatesProvider(