diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs index ec31764ba70..e44fd4023df 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs @@ -13,6 +13,10 @@ +{{else if (eq this.type this.AUDIO_TYPE)}} + {{else}} `); + + assert.true(exists("audio.chat-audio-upload"), "displays as an audio"); + const audio = query("audio.chat-audio-upload"); + assert.true(audio.hasAttribute("controls"), "has audio controls"); + assert.strictEqual( + audio.getAttribute("preload"), + "metadata", + "audio has correct preload settings" + ); + }); + test("non image upload", async function (assert) { this.set("upload", TXT_FIXTURE);