FIX: Selected group cleared between emoji uploads (PR #15581)

When uploading multiple emoji in Admin/Customize/Emojis with an emoji Group selected, the group was cleared between each file uploaded, making bulk uploading of emojis a chore if anything but the default group was needed.

This commit fixes the issue, introduces tests for emoji-uploader, and also adds add-files appEvents for uppy-upload mixin, same as the composer-upload-uppy mixin, for interop with tests and so we don’t have to rely on a file upload element’s change event.

GitHub

How is the first parameter (files) passed in by this.appEvents.on / this.appEvents.off? Is it because we’re @bind-ing it to the caller’s scope? If that’s the case off doesn’t have files and is it fine?

appEvents is a service that is automatically injected into mixins/components. When you trigger an appEvent you pass through the params you want

@bind is used to make sure the scope inside _addFiles still refers to the component/mixin (you can also do this.appEvents.on(``upload-mixin:${this.id}:add-files``, this._addFiles.bind(this));)