Skip to content

Commit 8c8525f

Browse files
fix(QuizWidget.stories): fix render of "Layer 2" translation text
1 parent 175f127 commit 8c8525f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.storybook/i18next.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ i18n.use(initReactI18next).init({
5858
react: { useSuspense: false },
5959
supportedLngs,
6060
resources,
61+
defaultNS: "common",
6162
})
6263

6364
export default i18n

src/components/Quiz/QuizWidget/QuizWidget.stories.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ export const QuizWidgetAllCorrect: StoryObj<typeof meta> = {
4747
const quizWidget = canvas.getByTestId("quiz-widget")
4848
await expect(quizWidget).toBeInTheDocument()
4949

50-
// TODO: would like to add this check to confirm translation is working
51-
// currently broken here, despite it working fine in prod
52-
// await waitFor(() =>
53-
// expect(canvas.getByTestId("answer-status-null")).toHaveTextContent(
54-
// "Layer 2"
55-
// )
56-
// )
50+
await waitFor(() =>
51+
expect(canvas.getByTestId("answer-status-null")).toHaveTextContent(
52+
"Layer 2"
53+
)
54+
)
5755

5856
await waitFor(() =>
5957
expect(canvas.getByTestId("check-answer-button")).toBeDisabled()

0 commit comments

Comments
 (0)