From a7c1ed76c07d9f2e5eb660a1a206fa2a2116ad08 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Mon, 9 Oct 2023 12:51:32 +0200 Subject: [PATCH] chore(deps): fix NcListItem rename *title => *name props, adjust tests, remove deep styles Signed-off-by: Maksim Sukharev --- .../ConversationsList/Conversation.spec.js | 8 +-- .../ConversationsList/Conversation.vue | 10 +-- .../LeftSidebar/LeftSidebar.spec.js | 20 +++--- src/components/LeftSidebar/LeftSidebar.vue | 69 ++++++++++--------- src/test-helpers.js | 4 +- 5 files changed, 54 insertions(+), 57 deletions(-) diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js index 5ae85985c655..aa9d108fab56 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js +++ b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js @@ -101,7 +101,7 @@ describe('Conversation.vue', () => { const el = wrapper.findComponent({ name: 'NcListItem' }) expect(el.exists()).toBe(true) - expect(el.props('title')).toBe('conversation one') + expect(el.props('name')).toBe('conversation one') const icon = el.findComponent({ name: 'ConversationIcon' }) expect(icon.props('item')).toStrictEqual(item) @@ -109,10 +109,10 @@ describe('Conversation.vue', () => { expect(icon.props('hideCall')).toStrictEqual(false) }) - describe('displayed subtitle', () => { + describe('displayed subname', () => { /** * @param {object} item Conversation data - * @param {string} expectedText Expected subtitle of the conversation item + * @param {string} expectedText Expected subname of the conversation item * @param {boolean} isSearchResult Whether or not the item is a search result (has no … menu) */ function testConversationLabel(item, expectedText, isSearchResult = false) { @@ -129,7 +129,7 @@ describe('Conversation.vue', () => { }) const el = wrapper.findComponent({ name: 'NcListItem' }) - expect(el.vm.$slots.subtitle[0].text.trim()).toBe(expectedText) + expect(el.vm.$slots.subname[0].text.trim()).toBe(expectedText) } test('display joining conversation message when not joined yet', () => { diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue index 89cc2ee294cb..a624e5febe17 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.vue +++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue @@ -21,7 +21,7 @@ - - {{ t('spreed','Create a new conversation') }} + {{ t('spreed', 'Create a new conversation') }} - {{ t('spreed','New personal note') }} + {{ t('spreed', 'New personal note') }} - {{ t('spreed','Join open conversations') }} + {{ t('spreed', 'Join open conversations') }} @@ -118,17 +118,18 @@