Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions apps/website/e2e/payment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const CLOUD_URL = externalLinks.cloud
const PLATFORM_USAGE_URL = externalLinks.platformUsage
const SUPPORT_URL = externalLinks.support
const DOCS_SUBSCRIPTION_URL = externalLinks.docsSubscription
const STATUS_URL = externalLinks.cloudStatus

async function expectNoIndex(page: Page) {
await expect(page.locator('meta[name="robots"]')).toHaveAttribute(
Expand Down Expand Up @@ -79,6 +80,17 @@ test.describe('Payment failed page @smoke', () => {
await expect(cta).toBeVisible()
await expect(cta).toHaveAttribute('href', DOCS_SUBSCRIPTION_URL)
})

test('points at the status page so an outage can be ruled out', async ({
page
}) => {
const statusLink = page.getByRole('link', {
name: 'status page',
exact: true
})
await expect(statusLink).toBeVisible()
await expect(statusLink).toHaveAttribute('href', STATUS_URL)
})
})

test.describe('Payment pages zh-CN @smoke', () => {
Expand Down Expand Up @@ -111,5 +123,8 @@ test.describe('Payment pages zh-CN @smoke', () => {
await expect(
page.getByRole('link', { name: '查看订阅文档' })
).toHaveAttribute('href', DOCS_SUBSCRIPTION_URL)
await expect(
page.getByRole('link', { name: '状态页面', exact: true })
).toHaveAttribute('href', STATUS_URL)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
})
})
18 changes: 16 additions & 2 deletions apps/website/src/components/payment/PaymentStatusSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ const iconRingClass =
<SectionLabel>{{ t(`payment.${status}.label`, locale) }}</SectionLabel>

<h1
class="text-primary-comfy-canvas text-4xl/tight font-light md:text-5xl/tight lg:text-6xl/tight"
class="text-4xl/tight font-light text-primary-comfy-canvas md:text-5xl/tight lg:text-6xl/tight"
>
{{ t(`payment.${status}.title`, locale) }}
</h1>

<p
class="text-primary-comfy-canvas/80 max-w-xl text-base font-light lg:text-lg"
class="max-w-xl text-base font-light text-primary-comfy-canvas/80 lg:text-lg"
>
{{ t(`payment.${status}.subtitle`, locale) }}
</p>
Expand All @@ -96,6 +96,20 @@ const iconRingClass =
{{ t(`payment.${status}.secondaryCta`, locale) }}
</BrandButton>
</div>

<p
v-if="status === 'failed'"
class="max-w-xl text-sm font-light text-primary-comfy-canvas/60"
>
{{ t('payment.failed.statusPrompt.prefix', locale) }}
<a
:href="externalLinks.cloudStatus"
class="text-primary-comfy-yellow underline underline-offset-4"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
>
{{ t('payment.failed.statusPrompt.statusLink', locale) }}
</a>
{{ t('payment.failed.statusPrompt.suffix', locale) }}
</p>
</div>
</section>
</template>
12 changes: 12 additions & 0 deletions apps/website/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4615,6 +4615,18 @@ const translations = {
en: 'READ SUBSCRIPTION DOCS',
'zh-CN': '查看订阅文档'
},
'payment.failed.statusPrompt.prefix': {
en: 'Check our',
'zh-CN': '请查看我们的'
},
'payment.failed.statusPrompt.statusLink': {
en: 'status page',
'zh-CN': '状态页面'
},
'payment.failed.statusPrompt.suffix': {
en: 'for more information.',
'zh-CN': '了解更多信息。'
},

// AffiliateHeroSection
'affiliate.hero.label': { en: 'AFFILIATE', 'zh-CN': '联盟' },
Expand Down
Loading