feat: add embed for wistia (#11547)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2025-05-22 19:09:03 +05:30
committed by GitHub
parent 459f225559
commit a3bf753f4c
3 changed files with 111 additions and 48 deletions

View File

@@ -143,6 +143,17 @@ describe CustomMarkdownRenderer do
end
end
context 'when link is a wistia URL' do
let(:wistia_url) { 'https://chatwoot.wistia.com/medias/kjwjeq6f9i' }
it 'renders a custom element with Wistia embed code' do
output = render_markdown_link(wistia_url)
expect(output).to include('<script src="https://fast.wistia.com/player.js" async></script>')
expect(output).to include('<wistia-player')
expect(output).to include('media-id="kjwjeq6f9i"')
end
end
context 'when multiple links including Arcade are present' do
it 'renders Arcade embed along with other content types' do
markdown = "\n[arcade](https://app.arcade.software/share/ARCADE_ID)\n\n[youtube](https://www.youtube.com/watch?v=VIDEO_ID)\n"