Skip to content

Commit eb32ef8

Browse files
fix(cross-sell): pin outcome value grouping to en-IN (deterministic INR)
The observed-outcome value used a bare toLocaleString(), so its grouping followed the host's default locale — 1,25,000 on an Indian-locale box, 125,000 on a US-locale runner. That made the integration assertion environment-dependent (it expected US grouping and failed on this box). This is Indian BFSI money (INR); pin en-IN so it always reads 1,25,000, and assert the true artifact. Verified green under both en-IN and en-US.
1 parent d8e58f2 commit eb32ef8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/app-use/CrossSellCustomerJourney.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ export function CrossSellCustomerJourney({
208208
<p className="mt-1 text-xs text-muted-foreground">
209209
{formatDate(outcome.observedAt)}
210210
{outcome.value !== null && outcome.currency
211-
? ` · ${outcome.currency} ${outcome.value.toLocaleString()}`
211+
? // Pin the grouping locale: this is Indian BFSI money (INR), so it
212+
// must read 1,25,000 — and a bare toLocaleString() would otherwise
213+
// follow the host's default locale, making the output non-deterministic.
214+
` · ${outcome.currency} ${outcome.value.toLocaleString('en-IN')}`
212215
: ''}
213216
</p>
214217
<p className="mt-1 break-all font-mono text-[10px] text-muted-foreground">

test/cross-sell-rm-experience.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ test('an observed response stays separate from CRM completion and suggests conve
215215
assert.match(html, /value="converted" selected=""/);
216216
assert.match(html, /Observed customer results/);
217217
assert.match(html, /accepted/);
218-
assert.match(html, /INR 125,000/);
218+
assert.match(html, /INR 1,25,000/);
219219
assert.match(html, /CRM completion confirms the system change/);
220220
});
221221

0 commit comments

Comments
 (0)