mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 06:39:09 +03:00
fix status banner duplicate status page link
This commit is contained in:
1 parent
dc95335a8d
commit
f51307a5b4
3 files changed
+21
-2
No files matched your search
@@ -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<StatusPageResponse>(
|
||||
buildStatusPage({ ongoing_incidents: [buildIncident()] })
|
||||
)
|
||||
)
|
||||
)
|
||||
mockOrgProjectEndpoints()
|
||||
|
||||
customRender(<StatusBanner />, { 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`, () =>
|
||||
|
||||
@@ -27,7 +27,7 @@ function getBannerDescription({
|
||||
if (selection.kind === 'incident') {
|
||||
return (
|
||||
<>
|
||||
{description} <InlineLink href={pageUrl}>Status page</InlineLink>
|
||||
Follow the <InlineLink href={pageUrl}>status page</InlineLink> for updates
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user