kolibri
kolibri copied to clipboard
TextEntryInteraction "Numbers in the content language" tests use the pre-#15571 answerState shape, failing Javascript Tests on develop
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: develop
Observed behavior
- Javascript Tests › Frontend tests fails on develop since
f98528716f(merge of #15571): 24 failures, all inTextEntryInteraction.spec.js› "Numbers in the content language": https://github.com/learningequality/kolibri/actions/runs/39508926094/job/118924835366 - Every open PR's Frontend tests check fails the same way.
- The block was added by #15583 and reads
checkAnswer().outcomesandanswerState.RESPONSE, and injectsanswerState: { RESPONSE: … }; #15571 moved these toanswerState.outcomesandanswerState.responses: https://github.com/learningequality/kolibri/blob/6813f27080f31b804081fc7dc23edf3dd9647282/kolibri/plugins/qti_viewer/frontend/components/interactions/tests/TextEntryInteraction.spec.js#L406-L545
Errors and logs
● Numbers in the content language › fr integer field reads 1,5 as 1
TypeError: Cannot read properties of undefined (reading 'SCORE')
● Numbers in the content language › fr shows 1234.5 as 1234,5 in report mode
Expected element to have text content: 1234,5 Received:
● Numbers in the content language › clears the response when the field is cleared
expect(received).toBeNull() Received: undefined
Steps to reproduce
- Check out develop at
6813f27080. - Run
pnpm test-jest --testPathPatterns TextEntryInteraction.
Acceptance Criteria
- [ ] All tests in
TextEntryInteraction.spec.jspass on develop. - [ ] No test in the "Numbers in the content language" block reads or injects the flat
answerState/outcomesshape.
AI usage
Claude Code found this while diagnosing a CI failure on #15625, matched it against develop's failing runs, and drafted this issue.
Fixed in #15641