diff --git a/src/components/ConversationsOptionsList.vue b/src/components/ConversationsOptionsList.vue index 37219c0f389..446793ff41c 100644 --- a/src/components/ConversationsOptionsList.vue +++ b/src/components/ConversationsOptionsList.vue @@ -21,7 +21,7 @@ - + - - diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js index bdeb3a3d27d..9a6b410901c 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js +++ b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js @@ -85,7 +85,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) expect(el.props('title')).toBe('conversation one') @@ -109,7 +109,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.vm.$slots.subtitle[0].text.trim()).toBe(expectedText) } @@ -281,28 +281,27 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) - const counter = el.vm.$slots.counter[0] - expect(counter.componentInstance.$el.textContent).toBe(expectedCounterText) - expect(counter.componentInstance.highlighted).toBe(expectedHighlighted) + expect(el.props('counterNumber')).toBe(expectedCounterText) + expect(el.props('counterHighlighted')).toBe(expectedHighlighted) } test('renders unread messages counter', () => { item.unreadMessages = 5 - testCounter(item, '5', false) + testCounter(item, 5, false) }) test('renders unread mentions highlighted for non one-to-one conversations', () => { item.unreadMessages = 5 item.unreadMention = true - testCounter(item, '5', true) + testCounter(item, 5, true) }) test('renders unread mentions always highlighted for one-to-one conversations', () => { item.unreadMessages = 5 item.unreadMention = false item.type = CONVERSATION.TYPE.ONE_TO_ONE - testCounter(item, '5', true) + testCounter(item, 5, true) }) test('does not render counter when no unread messages', () => { @@ -318,7 +317,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) expect(el.vm.$slots.counter).not.toBeDefined() @@ -359,7 +358,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) return findActionButton(el, actionName) @@ -378,7 +377,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) await el.find('a').trigger('click') @@ -524,7 +523,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) const action = findActionButton(el, 'Copy link') @@ -553,7 +552,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) const action = findActionButton(el, 'Add to favorites') @@ -584,7 +583,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) const action = findActionButton(el, 'Remove from favorites') @@ -620,7 +619,7 @@ describe('Conversation.vue', () => { }, }) - const el = wrapper.findComponent({ name: 'AppContentListItem' }) + const el = wrapper.findComponent({ name: 'ListItem' }) expect(el.exists()).toBe(true) const actionButtons = wrapper.findAllComponents(ActionButton) diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue index 854aabdf326..4f4e792766d 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.vue +++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue @@ -20,11 +20,14 @@ -->