mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 03:15:01 +00:00
fix(cloud): ENTITLEMENTS-D plan-unavailable body stays muted (design-squad); feature-copy test uses the real translator
This commit is contained in:
@@ -256,7 +256,10 @@ export function CheckoutPanel(props: CheckoutPanelProps): React.JSX.Element {
|
||||
id={bodyId}
|
||||
className={cn(
|
||||
'max-w-sm text-sm text-pretty',
|
||||
phase.kind === 'open-failed' ? 'text-destructive' : 'text-muted-foreground'
|
||||
// Unavailable is not the buyer's error: the title and icon carry it, the body stays muted.
|
||||
phase.kind === 'open-failed' && phase.result.status !== 'plan-unavailable'
|
||||
? 'text-destructive'
|
||||
: 'text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
{body}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { translate as t } from '@/i18n/i18n'
|
||||
import { planFeatureLine, planFeatureLines } from './plan-feature-copy'
|
||||
|
||||
// The default-value translator the renderer falls back to (interpolates {{name}}).
|
||||
const t = ((_key: string, fallback: string, values?: Record<string, unknown>) =>
|
||||
fallback.replace(/\{\{(\w+)\}\}/g, (_, name: string) => String(values?.[name] ?? ''))) as never
|
||||
|
||||
const context = { overage: { centsPerHour: 100, defaultSpendCapCents: 2500 }, currency: 'usd' }
|
||||
|
||||
describe('plan feature copy', () => {
|
||||
|
||||
Reference in New Issue
Block a user