Skip to content

Commit fee8599

Browse files
author
tiebreak-probe
committed
test(webview): assert the English first paint for a non-English initial locale
What: add one synchronous assertion in the non-English initial-language test that the first paint resolves the English fallback string before the loader finishes and the switch lands on Korean. Why: the test jumped straight to a waitFor for the final Korean title, so a provider that gated rendering on the loader, or one that eagerly bundled the requested locale, still passed. A mutation probe that gates non-fallback languages on loadLanguage survives all five existing tests and is caught only by this assertion. Impact: test-only. No production source changes; the suite stays at 5 passing and the i18n folder at 14 passing.
1 parent 4fcf7ee commit fee8599

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎webview-ui/src/i18n/__tests__/TranslationContext.locale-loading.spec.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ describe("TranslationProvider locale loading", () => {
4545

4646
// Korean bundles are not in the entry chunk, so the first paint resolves
4747
// through the English fallback and the switch lands after the fetch.
48+
expect(screen.getByTestId("error-title")).toHaveTextContent("Something went wrong")
49+
4850
await waitFor(() => {
4951
expect(screen.getByTestId("error-title")).toHaveTextContent("문제가 발생했습니다")
5052
})

0 commit comments

Comments
 (0)