diff --git a/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx b/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx index 38976d1a86a..f50448a39a2 100644 --- a/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx +++ b/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx @@ -153,6 +153,25 @@ describe('StatusBanner', () => { }) }) + test('incident description links "status page" inline without a trailing Status page link', async () => { + mswServer.use( + http.get(`${BASE_PATH}/api/status-page`, () => + HttpResponse.json( + buildStatusPage({ ongoing_incidents: [buildIncident()] }) + ) + ) + ) + mockOrgProjectEndpoints() + + customRender(, { profileContext: createMockProfileContext() }) + + await screen.findByText(INCIDENT_TITLE) + + const statusPageLink = screen.getByRole('link', { name: 'status page' }) + expect(statusPageLink).toHaveAttribute('href', 'https://status.supabase.com/') + expect(screen.queryByRole('link', { name: 'Status page' })).not.toBeInTheDocument() + }) + test('dismissing hides the banner and writes the dismissed key to local storage', async () => { mswServer.use( http.get(`${BASE_PATH}/api/status-page`, () => diff --git a/apps/studio/components/layouts/AppLayout/StatusBanner.tsx b/apps/studio/components/layouts/AppLayout/StatusBanner.tsx index fae92f7b77b..e751b14f865 100644 --- a/apps/studio/components/layouts/AppLayout/StatusBanner.tsx +++ b/apps/studio/components/layouts/AppLayout/StatusBanner.tsx @@ -27,7 +27,7 @@ function getBannerDescription({ if (selection.kind === 'incident') { return ( <> - {description} Status page + Follow the status page for updates ) } diff --git a/apps/studio/components/layouts/AppLayout/StatusBanner.utils.ts b/apps/studio/components/layouts/AppLayout/StatusBanner.utils.ts index a8e055b8523..205ff728454 100644 --- a/apps/studio/components/layouts/AppLayout/StatusBanner.utils.ts +++ b/apps/studio/components/layouts/AppLayout/StatusBanner.utils.ts @@ -114,7 +114,7 @@ export function getBannerCopy(selection: BannerSelection): { title: string; desc selection.items.length > 1 ? 'We are investigating multiple technical issues' : 'We are investigating a technical issue' - return { title, description: 'Follow the status page for updates' } + return { title, description: '' } } case 'maintenance': { const { scheduledEndAt } = selection.item