From df78e4faf9dc4e5015642ffd600af3268be137ba Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 22 Mar 2024 09:12:42 +0100 Subject: [PATCH] feat(LeftSidebar): move fast creating under current conversations, add subnames Signed-off-by: Maksim Sukharev --- .../LeftSidebar/LeftSidebar.spec.js | 7 +-- src/components/LeftSidebar/LeftSidebar.vue | 43 +++++++++++++------ 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/components/LeftSidebar/LeftSidebar.spec.js b/src/components/LeftSidebar/LeftSidebar.spec.js index 3583bba93f21..b20bb412f38f 100644 --- a/src/components/LeftSidebar/LeftSidebar.spec.js +++ b/src/components/LeftSidebar/LeftSidebar.spec.js @@ -343,7 +343,7 @@ describe('LeftSidebar.vue', () => { ) // Check all captions - const captionList = ['Conversations', 'Open conversations', 'Users', 'Groups', 'Teams'] + const captionList = ['Conversations', 'Create a new conversation', 'Open conversations', 'Users', 'Groups', 'Teams'] const captionListItems = wrapper.findAllComponents({ name: 'NcAppNavigationCaption' }) expect(captionListItems.exists()).toBeTruthy() expect(captionListItems).toHaveLength(captionList.length) @@ -425,7 +425,7 @@ describe('LeftSidebar.vue', () => { ) // Check all captions - const captionList = ['Conversations', 'Open conversations', 'Users', 'Groups'] + const captionList = ['Conversations', 'Create a new conversation', 'Open conversations', 'Users', 'Groups'] const captionListItems = wrapper.findAllComponents({ name: 'NcAppNavigationCaption' }) expect(captionListItems.exists()).toBeTruthy() expect(captionListItems).toHaveLength(captionList.length) @@ -478,7 +478,8 @@ describe('LeftSidebar.vue', () => { if (listedResults.length > 0) { expect(captionsEls.length).toBeGreaterThan(2) expect(captionsEls.at(0).props('name')).toBe('Conversations') - expect(captionsEls.at(1).props('name')).toBe('Open conversations') + expect(captionsEls.at(1).props('name')).toBe('Create a new conversation') + expect(captionsEls.at(2).props('name')).toBe('Open conversations') } else { expect(captionsEls.length).toBeGreaterThan(1) expect(captionsEls.at(0).props('name')).toBe('Conversations') diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index 68807a21ad44..1934164bb24f 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -182,28 +182,30 @@