From ad3a2fd4e5a7811107790cfba0cd83e33d2f4115 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 16 Jun 2021 01:20:20 +0300 Subject: fixed "invisible" spans inside links --- test/unit/specs/components/rich_content.spec.js | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'test') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 82f1ae89..be51bbd1 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -639,4 +639,48 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(expected)) }) + + it('contents of a link', () => { + const html = [ + '

', + 'Freenode is dead.

', + '

', + '', + '', + 'https://', + '', + 'isfreenodedeadyet.com/', + '', + '', + '', + '

' + ].join('') + const expected = [ + '

', + 'Freenode is dead.

', + '

', + '', + '', + 'https://', + '', + 'isfreenodedeadyet.com/', + '', + '', + '', + '

' + ].join('') + + const wrapper = shallowMount(RichContent, { + localVue, + propsData: { + hideMentions: false, + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) }) -- cgit v1.2.3-70-g09d2