In certain (as yet unidentified) circumstances, when removing a media block (audio, image, video), the block editor's singleFileUploader component is undefined by the time sjrk.storyTelling.ui.storyEditor.removeSelectedBlocks() is called.
This has only been observed in the tests for sjrk.storyTelling.ui.storyEditor and sjrk.storyTelling.base.page.storyEdit.
- Check out the tool at this exact commit: https://github.com/BlueSlug/sjrk-story-telling/tree/52e198dceae3e2aaa6a6e0334770cf9f25bdc6d5
- Run the site via a basic HTTP server such as Browsersync
- Navigate to the storyEditor browser tests: http://localhost:3000/tests/ui/html/ui-storyEditor-Tests.html
Tests complete successfully
The tests hang and an error is displayed on the developer console (see attached screenshot):