diff --git a/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx b/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx index 9231571540..db5c52a02f 100644 --- a/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx +++ b/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx @@ -147,6 +147,27 @@ describe('log cost display', () => { expect(screen.getByRole('img', { name: 'Subscription' })).toBeVisible() }) + test.each([ + { source: 'subscription', label: 'Subscription' }, + { source: 'wallet', label: 'Wallet' }, + ])( + 'vertically centers the $source icon within its container', + ({ source, label }) => { + renderCost({ + quota: 5000, + other: { billing_source: source }, + showBillingSource: true, + }) + + // Mobile cards give inline-flex descendants a minimum height, so the + // source container must center its smaller icon independently of the badge. + expect(screen.getByRole('img', { name: label })).toHaveClass( + 'inline-flex', + 'items-center' + ) + } + ) + test.each([ { source: 'subscription', label: 'Subscription' }, { source: 'wallet', label: 'Wallet' }, diff --git a/web/src/features/usage-logs/components/log-cost-display.tsx b/web/src/features/usage-logs/components/log-cost-display.tsx index efcfabbbd5..551363c60b 100644 --- a/web/src/features/usage-logs/components/log-cost-display.tsx +++ b/web/src/features/usage-logs/components/log-cost-display.tsx @@ -115,7 +115,7 @@ export function LogCostDisplay(props: LogCostDisplayProps) {