From a8d198768639435bad93a527228f62575eed37c0 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 19 Feb 2022 22:40:19 +0200 Subject: fix unit tests --- test/unit/specs/components/rich_content.spec.js | 1 - 1 file changed, 1 deletion(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index f6c478a9..8a29bd6e 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -350,7 +350,6 @@ describe('RichContent', () => { '', '', '', - ' ', '', // v-if placeholder, mentionlink's "new" (i.e. rich) display '', '', // v-if placeholder, mentionsline's extra mentions and stuff -- cgit v1.2.3-70-g09d2 From 86e3aefdab3fa1314d4731eabcf03f8c9e418e41 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 19 Feb 2022 23:04:51 +0200 Subject: new unit tests --- test/unit/specs/components/rich_content.spec.js | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 8a29bd6e..30c66a33 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -374,6 +374,84 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(expected)) }) + it('rich contents of nested mentions are handled properly', () => { + attentions.push({ statusnet_profile_url: 'lol' }) + const html = [ + p( + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + ' ', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + '' + ), + p( + 'Testing' + ) + ].join('') + const expected = [ + p( + '', + '', + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', + '', // v-if placeholder, mentionsline's extra mentions and stuff + '', + '' + ), + ' ', + p( + 'Testing' + ) + ].join('') + + const wrapper = mount(RichContent, { + localVue, + propsData: { + attentions, + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) + it('rich contents of a link are handled properly', () => { const html = [ '

', -- cgit v1.2.3-70-g09d2 From c2cf13fc006aa1e513feb99799a8d2df14119eca Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 22 Mar 2022 16:40:45 +0200 Subject: fix richcontent and its tests --- src/components/rich_content/rich_content.jsx | 7 +- test/unit/specs/components/rich_content.spec.js | 234 ++++++++++++------------ 2 files changed, 124 insertions(+), 117 deletions(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 97c51189..41e287e4 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -1,4 +1,3 @@ -import { h } from 'vue' import { unescape, flattenDeep } from 'lodash' import { getTagName, processTextForEmoji, getAttrs } from 'src/services/html_converter/utility.service.js' import { convertHtmlToTree } from 'src/services/html_converter/html_tree_converter.service.js' @@ -82,12 +81,12 @@ export default { } const renderHashtag = (attrs, children, encounteredTextReverse) => { - const linkData = getLinkData(attrs, children, tagsIndex++) + const { index, ...linkData } = getLinkData(attrs, children, tagsIndex++) writtenTags.push(linkData) if (!encounteredTextReverse) { lastTags.push(linkData) } - return + return } const renderMention = (attrs, children) => { @@ -235,7 +234,7 @@ export default { const newChildren = Array.isArray(children) ? [...children].reverse().map(processItemReverse).reverse() : children - return + return { newChildren } } else { diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 30c66a33..a4920867 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -1,8 +1,15 @@ -import { mount, shallowMount, createLocalVue } from '@vue/test-utils' +import { mount, shallowMount } from '@vue/test-utils' import RichContent from 'src/components/rich_content/rich_content.jsx' -const localVue = createLocalVue() const attentions = [] +const global = { + mocks: { + '$store': null + }, + stubs: { + FAIcon: true + } +} const makeMention = (who) => { attentions.push({ statusnet_profile_url: `https://fake.tld/@${who}` }) @@ -11,17 +18,17 @@ const makeMention = (who) => { const p = (...data) => `

${data.join('')}

` const compwrap = (...data) => `${data.join('')}` const mentionsLine = (times) => [ - '' + '">' ].join('') describe('RichContent', () => { it('renders simple post without exploding', () => { const html = p('Hello world!') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -30,7 +37,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(html)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(html)) }) it('unescapes everything as needed', () => { @@ -43,8 +50,8 @@ describe('RichContent', () => { 'Testing \'em all' ].join('') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -53,7 +60,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('replaces mention with mentionsline', () => { @@ -62,8 +69,8 @@ describe('RichContent', () => { ' how are you doing today?' ) const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -72,7 +79,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(p( + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(p( mentionsLine(1), ' how are you doing today?' ))) @@ -93,17 +100,17 @@ describe('RichContent', () => { ), // TODO fix this extra line somehow? p( - '' + '">' ) ].join('') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -112,7 +119,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('Does not touch links if link handling is disabled', () => { @@ -130,8 +137,8 @@ describe('RichContent', () => { ].join('\n') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: false, greentext: true, @@ -154,8 +161,8 @@ describe('RichContent', () => { ].join('\n') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: false, greentext: true, @@ -174,8 +181,8 @@ describe('RichContent', () => { ].join('\n') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: false, greentext: false, @@ -191,12 +198,12 @@ describe('RichContent', () => { const html = p('Ebin :DDDD :spurdo:') const expected = p( 'Ebin :DDDD ', - '' + '' ) const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: false, greentext: false, @@ -205,15 +212,15 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('Doesn\'t add nonexistent emoji to post', () => { const html = p('Lol :lol:') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: false, greentext: false, @@ -222,7 +229,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(html)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(html)) }) it('Greentext + last mentions', () => { @@ -240,8 +247,8 @@ describe('RichContent', () => { ].join('\n') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -272,8 +279,8 @@ describe('RichContent', () => { ].join('
') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -282,7 +289,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('buggy example/hashtags', () => { @@ -300,16 +307,18 @@ describe('RichContent', () => { '

', '', 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg', - ' ', - '', - ' ', - '', + ' ', + '#nou', + '', + ' ', + '#screencap', + '', '

' ].join('') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -318,7 +327,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('rich contents of a mention are handled properly', () => { @@ -342,7 +351,8 @@ describe('RichContent', () => { p( '', '', - '', + '', + '', '', 'https://', '', @@ -350,9 +360,10 @@ describe('RichContent', () => { '', '', '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', + '', // v-if placeholder, mentionlink's "new" (i.e. rich) display '', - '', // v-if placeholder, mentionsline's extra mentions and stuff + '', // v-if placeholder, mentionsline's extra mentions and stuff '' ), p( @@ -361,8 +372,8 @@ describe('RichContent', () => { ].join('') const wrapper = mount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -371,76 +382,73 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('rich contents of nested mentions are handled properly', () => { attentions.push({ statusnet_profile_url: 'lol' }) const html = [ - p( - '', - '', - '', - 'https://', - '', - 'lol.tld/', - '', - '', - '', - ' ', - '', - '', - 'https://', - '', - 'lol.tld/', - '', - '', - '', - '' - ), - p( - 'Testing' - ) + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + ' ', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + ' ', + '', + 'Testing' ].join('') const expected = [ - p( - '', - '', - '', - '', - '', - 'https://', - '', - 'lol.tld/', - '', - '', - '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display - '', - '', - '', - '', - 'https://', - '', - 'lol.tld/', - '', - '', - '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display - '', - '', // v-if placeholder, mentionsline's extra mentions and stuff - '', - '' - ), + '', + '', + '', + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + '', + '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', + '', + '', + '', + '', + 'https://', + '', + 'lol.tld/', + '', + '', + '', + '', + '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', + '', // v-if placeholder, mentionsline's extra mentions and stuff + '', ' ', - p( - 'Testing' - ) + '', + 'Testing' ].join('') const wrapper = mount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -449,7 +457,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it('rich contents of a link are handled properly', () => { @@ -483,8 +491,8 @@ describe('RichContent', () => { ].join('') const wrapper = shallowMount(RichContent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks: true, greentext: true, @@ -493,7 +501,7 @@ describe('RichContent', () => { } }) - expect(wrapper.html()).to.eql(compwrap(expected)) + expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected)) }) it.skip('[INFORMATIVE] Performance testing, 10 000 simple posts', () => { @@ -530,8 +538,8 @@ describe('RichContent', () => { const t0 = performance.now() const wrapper = mount(TestComponent, { - localVue, - propsData: { + global, + props: { attentions, handleLinks, vhtml -- cgit v1.2.3-70-g09d2 From 0bb69d7fe026181bb6367ced8a921d0c3a0dc6ba Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 12 Apr 2022 19:04:32 +0300 Subject: fix tests --- test/unit/specs/components/rich_content.spec.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index a4920867..958fb997 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -308,10 +308,8 @@ describe('RichContent', () => { '', 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg', ' ', - '#nou', '', ' ', - '#screencap', '', '

' ].join('') -- cgit v1.2.3-70-g09d2 From 3628fb4272c0b9f5a66f0de61e6c4f37f4908fe7 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 13 Jun 2022 13:19:54 +0300 Subject: fix tests --- test/unit/specs/components/rich_content.spec.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 958fb997..cd8d4b86 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') @@ -359,9 +366,9 @@ describe('RichContent', () => { '', '', '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', // vue placeholder '', - '', // v-if placeholder, mentionsline's extra mentions and stuff + '', // vue placeholder, mentionsline's extra mentions and stuff '' ), p( @@ -422,7 +429,7 @@ describe('RichContent', () => { '', '', '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', // vue placeholder, mentionlink's "new" (i.e. rich) display '', '', '', @@ -435,9 +442,9 @@ describe('RichContent', () => { '', '', '', - '', // v-if placeholder, mentionlink's "new" (i.e. rich) display + '', // vue placeholder, mentionlink's "new" (i.e. rich) display '', - '', // v-if placeholder, mentionsline's extra mentions and stuff + '', // vue placeholder, mentionsline's extra mentions and stuff '', ' ', '', -- cgit v1.2.3-70-g09d2 From 7d719a2b188ebee78d115e9102e2ad8f3460a2f0 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 21 Jun 2022 01:40:09 +0300 Subject: fix tests by just ignoring the html comments --- test/unit/specs/components/rich_content.spec.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index cd8d4b86..8a18a08b 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -356,7 +356,6 @@ describe('RichContent', () => { p( '', '', - '', '', '', 'https://', @@ -365,10 +364,7 @@ describe('RichContent', () => { '', '', '', - '', - '', // vue placeholder '', - '', // vue placeholder, mentionsline's extra mentions and stuff '' ), p( @@ -387,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', () => { @@ -419,7 +415,6 @@ describe('RichContent', () => { '', '', '', - '', '', '', 'https://', @@ -428,11 +423,8 @@ describe('RichContent', () => { '', '', '', - '', - '', // vue placeholder, mentionlink's "new" (i.e. rich) display '', '', - '', '', '', 'https://', @@ -441,10 +433,7 @@ describe('RichContent', () => { '', '', '', - '', - '', // vue placeholder, mentionlink's "new" (i.e. rich) display '', - '', // vue placeholder, mentionsline's extra mentions and stuff '', ' ', '', @@ -462,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', () => { -- cgit v1.2.3-70-g09d2 From fddb531ed20b31c44e6911418e7bbb884836c40a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 31 Jul 2022 12:35:48 +0300 Subject: --fix --- src/App.vue | 20 ++++-- src/boot/after_store.js | 4 +- src/boot/routes.js | 9 ++- src/components/about/about.vue | 2 +- src/components/account_actions/account_actions.vue | 4 +- src/components/avatar_list/avatar_list.vue | 2 +- src/components/basic_user_card/basic_user_card.vue | 11 ++-- src/components/chat/chat.js | 2 +- src/components/chat_list/chat_list.vue | 2 +- src/components/chat_message/chat_message.vue | 10 +-- src/components/chat_title/chat_title.vue | 4 +- src/components/checkbox/checkbox.vue | 4 +- src/components/color_input/color_input.vue | 2 +- src/components/conversation/conversation.js | 2 +- src/components/conversation/conversation.vue | 2 +- src/components/desktop_nav/desktop_nav.js | 24 +++++--- .../domain_mute_card/domain_mute_card.vue | 4 +- src/components/emoji_input/emoji_input.js | 2 +- src/components/emoji_picker/emoji_picker.js | 2 +- src/components/emoji_reactions/emoji_reactions.vue | 2 +- src/components/extra_buttons/extra_buttons.js | 2 +- src/components/extra_buttons/extra_buttons.vue | 6 +- src/components/favorite_button/favorite_button.vue | 2 +- src/components/features_panel/features_panel.vue | 2 +- src/components/flash/flash.js | 2 +- src/components/font_control/font_control.vue | 2 +- src/components/hashtag_link/hashtag_link.vue | 4 +- src/components/image_cropper/image_cropper.js | 2 +- .../instance_specific_panel.vue | 2 +- src/components/interactions/interactions.js | 2 +- .../interface_language_switcher.vue | 1 + src/components/login_form/login_form.js | 2 +- src/components/login_form/login_form.vue | 2 +- src/components/media_upload/media_upload.js | 5 +- src/components/media_upload/media_upload.vue | 2 +- src/components/mention_link/mention_link.vue | 17 ++--- src/components/mentions_line/mentions_line.vue | 14 ++--- src/components/mfa_form/recovery_form.vue | 2 +- src/components/mobile_nav/mobile_nav.vue | 5 +- src/components/modal/modal.vue | 8 +-- .../moderation_tools/moderation_tools.vue | 8 +-- .../mrf_transparency_panel.js | 6 +- src/components/nav_panel/nav_panel.vue | 2 +- src/components/notification/notification.js | 2 +- src/components/notification/notification.vue | 4 +- .../notifications/notification_filters.vue | 4 +- src/components/notifications/notifications.vue | 5 +- src/components/popover/popover.js | 34 +++++----- .../post_status_form/post_status_form.js | 16 ++--- src/components/react_button/react_button.js | 2 +- src/components/react_button/react_button.vue | 8 +-- src/components/remote_follow/remote_follow.js | 2 +- src/components/retweet_button/retweet_button.vue | 2 +- src/components/search_bar/search_bar.js | 2 +- src/components/selectable_list/selectable_list.vue | 4 +- .../settings_modal/helpers/modified_indicator.vue | 4 +- .../helpers/server_side_indicator.vue | 4 +- src/components/settings_modal/settings_modal.vue | 4 +- src/components/settings_modal/tabs/general_tab.vue | 10 ++- .../settings_modal/tabs/mutes_and_blocks_tab.vue | 34 +++++----- src/components/settings_modal/tabs/profile_tab.js | 10 +-- src/components/settings_modal/tabs/profile_tab.vue | 2 +- .../settings_modal/tabs/security_tab/mfa.js | 6 +- .../settings_modal/tabs/security_tab/mfa_totp.js | 2 +- .../tabs/security_tab/security_tab.js | 2 +- .../settings_modal/tabs/theme_tab/preview.vue | 5 +- .../settings_modal/tabs/theme_tab/theme_tab.js | 8 +-- src/components/shadow_control/shadow_control.js | 8 ++- src/components/shadow_control/shadow_control.vue | 2 +- src/components/shout_panel/shout_panel.js | 2 +- src/components/side_drawer/side_drawer.js | 2 +- src/components/side_drawer/side_drawer.vue | 2 +- src/components/staff_panel/staff_panel.js | 4 +- src/components/staff_panel/staff_panel.vue | 2 +- src/components/status/status.js | 6 +- src/components/status/status.vue | 11 ++-- src/components/status_body/status_body.vue | 2 +- src/components/status_content/status_content.vue | 2 +- src/components/status_popover/status_popover.vue | 8 +-- src/components/sticker_picker/sticker_picker.js | 4 +- .../terms_of_service_panel.vue | 2 +- src/components/timeline/timeline.vue | 5 +- .../timeline/timeline_quick_settings.vue | 4 +- src/components/timeline_menu/timeline_menu.js | 6 +- src/components/timeline_menu/timeline_menu.vue | 6 +- .../timeline_menu/timeline_menu_content.vue | 2 +- src/components/user_card/user_card.js | 2 +- src/components/user_card/user_card.vue | 2 +- .../user_list_popover/user_list_popover.vue | 6 +- src/components/user_popover/user_popover.vue | 42 ++++++------- src/components/user_profile/user_profile.vue | 15 +++-- .../user_reporting_modal/user_reporting_modal.vue | 2 +- src/components/who_to_follow/who_to_follow.js | 2 +- .../who_to_follow_panel/who_to_follow_panel.js | 10 +-- .../who_to_follow_panel/who_to_follow_panel.vue | 2 +- src/i18n/messages.js | 2 +- src/lib/notification-i18n-loader.js | 4 +- src/lib/persisted_state.js | 12 ++-- src/modules/api.js | 4 +- src/modules/config.js | 2 +- src/modules/errors.js | 4 +- src/modules/serverSideConfig.js | 28 ++++----- src/modules/statuses.js | 20 +++--- src/modules/users.js | 24 ++++---- src/services/api/api.service.js | 72 +++++++++++----------- src/services/chat_service/chat_service.js | 12 ++-- src/services/chat_utils/chat_utils.js | 2 +- src/services/color_convert/color_convert.js | 12 ++-- src/services/completion/completion.js | 2 +- src/services/date_utils/date_utils.js | 2 +- .../entity_normalizer/entity_normalizer.service.js | 4 +- src/services/file_size_format/file_size_format.js | 8 +-- .../html_converter/html_line_converter.service.js | 4 +- src/services/html_converter/utility.service.js | 2 +- src/services/locale/locale.service.js | 14 ++--- src/services/new_api/password_reset.js | 2 +- .../notifications_fetcher.service.js | 12 ++-- src/services/push/push.js | 4 +- src/services/theme_data/theme_data.service.js | 2 +- .../timeline_fetcher/timeline_fetcher.service.js | 16 ++--- src/services/user_highlighter/user_highlighter.js | 2 +- src/sw.js | 4 +- test/e2e/custom-assertions/elementCount.js | 2 +- test/e2e/nightwatch.conf.js | 54 ++++++++-------- test/e2e/runner.js | 8 +-- test/unit/karma.conf.js | 14 ++--- test/unit/specs/components/emoji_input.spec.js | 2 +- test/unit/specs/components/rich_content.spec.js | 2 +- test/unit/specs/components/user_profile.spec.js | 6 +- test/unit/specs/modules/statuses.spec.js | 4 +- .../services/chat_service/chat_service.spec.js | 24 ++++---- .../entity_normalizer/entity_normalizer.spec.js | 8 +-- .../file_size_format/file_size_format.spec.js | 4 +- 133 files changed, 508 insertions(+), 449 deletions(-) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/src/App.vue b/src/App.vue index 7d4a8e1e..0efadaf0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,8 +15,12 @@ class="app-layout container" :class="classes" > -
-