aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-07-31 11:44:15 +0300
committerHenry Jameson <me@hjkos.com>2022-07-31 11:44:15 +0300
commit1cf7af33741ee43aff9e597f0a69f62f7d660cf6 (patch)
tree75eea24b29b4204b57e38aec8223e91a1f1526fe /test
parent0b88c56aa674ad19be7e7e883a3687ec89569940 (diff)
parent36aae1635ad370ecf4d22ae6d62cbbba6af19fd3 (diff)
Merge branch 'disjointed-popovers' into eslint-update
* disjointed-popovers: (56 commits) fix typo fix errors in console pinned no longer needed popover stack add stay-on-click prop to solve case of clicking user avatar in status popover fix settings tooltips vertical nudge for popovers, especially for overlay-centers ones make user popover options expert use same sizing for timeline dropdown as in the main nav fix avatar not zooming in profile page fix spacing in mentionsline add popovers to chats fix avatar not closing, add option to put popovers next to avatar instead of over it fix the incorrect rounding in nav list re-unfuck the timeline popover Revert "unify styling of timelines dropdown with other dropdown menus" close on avatar click again, add zooming as option fix basicusercard make hover popovers less annoying to close move tooltips setting ...
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/components/rich_content.spec.js28
1 files changed, 12 insertions, 16 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js
index 958fb997..8a18a08b 100644
--- a/test/unit/specs/components/rich_content.spec.js
+++ b/test/unit/specs/components/rich_content.spec.js
@@ -4,7 +4,15 @@ import RichContent from 'src/components/rich_content/rich_content.jsx'
const attentions = []
const global = {
mocks: {
- '$store': null
+ '$store': {
+ state: {},
+ getters: {
+ mergedConfig: () => ({
+ mentionLinkShowTooltip: true
+ }),
+ findUserByUrl: () => null
+ }
+ }
},
stubs: {
FAIcon: true
@@ -131,8 +139,7 @@ describe('RichContent', () => {
].join(''),
[
makeMention('John'),
- makeMention('Josh'),
- makeMention('Jeremy')
+ makeMention('Josh'), makeMention('Jeremy')
].join('')
].join('\n')
@@ -349,7 +356,6 @@ describe('RichContent', () => {
p(
'<span class="MentionsLine">',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -358,10 +364,7 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!--v-if-->', // v-if placeholder, mentionlink's "new" (i.e. rich) display
'</span>',
- '<!--v-if-->', // v-if placeholder, mentionsline's extra mentions and stuff
'</span>'
),
p(
@@ -380,7 +383,7 @@ describe('RichContent', () => {
}
})
- expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected))
+ expect(wrapper.html().replace(/\n/g, '').replace(/<!--.*?-->/g, '')).to.eql(compwrap(expected))
})
it('rich contents of nested mentions are handled properly', () => {
@@ -412,7 +415,6 @@ describe('RichContent', () => {
'<span class="poast-style">',
'<span class="MentionsLine">',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -421,11 +423,8 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!--v-if-->', // v-if placeholder, mentionlink's "new" (i.e. rich) display
'</span>',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -434,10 +433,7 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!--v-if-->', // v-if placeholder, mentionlink's "new" (i.e. rich) display
'</span>',
- '<!--v-if-->', // v-if placeholder, mentionsline's extra mentions and stuff
'</span>',
' ',
'</span>',
@@ -455,7 +451,7 @@ describe('RichContent', () => {
}
})
- expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected))
+ expect(wrapper.html().replace(/\n/g, '').replace(/<!--.*?-->/g, '')).to.eql(compwrap(expected))
})
it('rich contents of a link are handled properly', () => {