Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensuring UserInput and Rubric widget keys match (#1884)
## Summary: While performing regression testing on the latest changes related to a conflict between our Server Side Scoring and Input Number Conversion projects, I found an edge case bug that needed to be handled. This bug was only reproducible on a test course that had an `input-number 2` and no `input-number 1`. As a result of the key mismatch between the `perseusRenderData` and `userInputMap`, the exercise became blocked / locked and unable to be continued after attempting to score. (If you would like a link to this exercise, please reach out to me!) This PR updates the conversion logic in `renderer-utils.ts` to update both the `perseusRenderData` and `userInputMap` at the same time, so that the widget keys are identical between the two formats. This should cover any additional edge cases (such as the presence of other numeric-inputs that might adjust the IDs of the convertedWidgets). Some additional updates were required to create the helper functions that can perform this work in tandem. Issue: LEMS-2624 ## Test plan: - manual testing - Snapshot testing in Webapp (fixes issue) Author: SonicScrewdriver Reviewers: SonicScrewdriver, handeyeco Required Reviewers: Approved By: handeyeco Checks: ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ gerald, ✅ gerald, 🚫 Publish npm snapshot (ubuntu-latest, 20.x), 🚫 Check builds for changes in size (ubuntu-latest, 20.x), 🚫 Cypress (ubuntu-latest, 20.x), 🚫 Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), 🚫 Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ⌛ undefined Pull Request URL: #1884
- Loading branch information