This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests
Martin Brennan f6528afa01
DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692)
This commit adds uploadHandler support to composer uploads using
uppy. The only things we have that are using this are discourse-brightcove and
discourse-video, which both pop modal windows to handle the file upload and
completely leave out all the composer-type flows. This implementation simply
follows the existing one, where if a single file is uploaded and there
is a matching upload handler we take control away from uppy and hand
it off to the upload handler.

Trying to get this kind of thing working within uppy would require a few
changes because they have no way to restrict uploaders to certain file types
and with the way their uploaders are run it doesn't look like it would be easy
to add this either, so I don't think this is worth the work unless at some
point in the future we plan to have more upload handler integrations.

I also fixed an issue with `cleanUpComposerUploadHandler` which is used
in tests to reset the state of `uploadHandlers` in the composer. This
was doing `uploadHandlers = []` to clear that array, but that creates
a brand new array so anything else referencing the original array will
lose that reference. Better to set `uploadHandlers.length = 0` to
clear it. This was breaking the tests I added to see if upload handlers
were working.
2021-10-26 11:22:33 +10:00
..
acceptance DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692) 2021-10-26 11:22:33 +10:00
fixtures FEATURE: save local date to calendar (#14486) 2021-10-06 14:11:52 +11:00
helpers DEV: Don't leak auth methods between tests (#14708) 2021-10-25 15:25:39 +02:00
integration DEV: replaces jquery call by vanilla js in uploader tests (#14702) 2021-10-25 10:49:14 +02:00
unit FIX: Correct tracking context for some category routes (#14685) 2021-10-25 15:05:00 -04:00
core_plugins_tests.js FEATURE: Allow theme tests to be run in production (take 2) (#12845) 2021-04-28 23:12:08 +03:00
index.html DEV: Allow plugin tests to run in Ember CLI qunit 2021-06-24 10:13:35 -04:00
plugin_tests.js.erb FIX: Load .js files from plugins in qunit testing env (#11304) 2020-12-03 10:25:42 -06:00
setup-tests.js DEV: Various behind-the-scenes improvements to PresenceChannel (#14518) 2021-10-07 15:50:14 +01:00
test_helper.js DEV: Move pretty-text into vendor and use that (#13273) 2021-06-04 11:01:59 -04:00
test_starter.js DEV: Use key over the deprecated keyCode (#13795) 2021-08-09 11:41:36 +02:00
test-helper.js DEV: avoids using document.write (#13858) 2021-07-27 14:42:21 +02:00
theme_qunit_ember_jquery.js FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00
theme_qunit_helper.js DEV: Arrange theme QUnit dependencies in the right order (#12907) 2021-04-30 13:28:33 +03:00
theme_qunit_tests_vendor.js FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00
theme_qunit_vendor.js DEV: uses forked Mousetrap to avoid leaking listeners (#14198) 2021-09-08 14:48:13 +02:00