Conversation
There was a problem hiding this comment.
Upgrading Sinon had me encounter an issue with how the focus-trap library was stubbed to assume the usage of a constructor. I also identified this in #3938, but the previous usage here does not appear to be correct. The default export of focus-trap is intended to be called as a factory function, not as a constructor.
See documentation for the version of the package used in the project:
app/javascript/app/document-capture/components/submission-pending.jsx
Outdated
Show resolved
Hide resolved
**Why**: The `runAll` method of Sinon fake timers was added in a later release. These will be necessary for fake timer utilities added in a subsequent commit.
**Why**: Once the user has submitted their documents for upload, it will take some time for the server to respond with the result of the upload. An interstitial screen should be shown to explain to the user that there is a brief delay, and that the page will update automatically once complete.
**Why** Since the rendering of this component is now controlled by React Suspense, it does not need to manage its own removal.
57452ed to
befe830
Compare
The merging of #3964 had a pretty dramatic effect here. I've finished rebasing the branch, where But as part of this, the component's But since this could be useful for future work, I made a point to deliberately keep the commit history in a shape where it could be easy to restore this code if needed. |

Relates to: LG-3023
Complements: #3964
Changes:
runAllmethod of Sinon fake timers was added in a later release. These is necessary for fake timer utilities used in verifying behavior of the SubmissionPending component.Screen recording: