kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

TextEntryInteraction "Numbers in the content language" tests use the pre-#15571 answerState shape, failing Javascript Tests on develop

Open rtibblesbot opened this issue 1 month ago • 1 comments

❌ 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 in TextEntryInteraction.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().outcomes and answerState.RESPONSE, and injects answerState: { RESPONSE: … }; #15571 moved these to answerState.outcomes and answerState.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

  1. Check out develop at 6813f27080.
  2. Run pnpm test-jest --testPathPatterns TextEntryInteraction.

Acceptance Criteria

  • [ ] All tests in TextEntryInteraction.spec.js pass on develop.
  • [ ] No test in the "Numbers in the content language" block reads or injects the flat answerState/outcomes shape.

AI usage

Claude Code found this while diagnosing a CI failure on #15625, matched it against develop's failing runs, and drafted this issue.

rtibblesbot avatar Oct 21 '26 06:10 rtibblesbot

Fixed in #15641

rtibbles avatar Oct 21 '26 22:10 rtibbles