diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/LeftSidebar/LeftSidebar.spec.js | 10 | ||||
-rw-r--r-- | src/components/LeftSidebar/LeftSidebar.vue | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/components/LeftSidebar/LeftSidebar.spec.js b/src/components/LeftSidebar/LeftSidebar.spec.js index cddc71fe3..029c8ce91 100644 --- a/src/components/LeftSidebar/LeftSidebar.spec.js +++ b/src/components/LeftSidebar/LeftSidebar.spec.js @@ -626,8 +626,8 @@ describe('LeftSidebar.vue', () => { const ncModalComponent = wrapper.findComponent(NcModal) expect(ncModalComponent.exists()).toBeTruthy() - const input = ncModalComponent.find('input[placeholder="Enter a name for this conversation"]') - expect(input.element.value).toBe(groupsResults[1].label) + const input = ncModalComponent.findComponent({name: 'NcTextField', ref: 'conversationName'}) + expect(input.props('value')).toBe(groupsResults[1].label) // nothing created yet expect(createOneToOneConversationAction).not.toHaveBeenCalled() @@ -648,9 +648,9 @@ describe('LeftSidebar.vue', () => { await wrapper.vm.$nextTick() const ncModalComponent = wrapper.findComponent(NcModal) expect(ncModalComponent.exists()).toBeTruthy() - - const input = ncModalComponent.find('input[placeholder="Enter a name for this conversation"]') - expect(input.element.value).toBe(circlesResults[1].label) + console.log(wrapper.html()) + const input = ncModalComponent.findComponent({name: 'NcTextField', ref: 'conversationName'}) + expect(input.props('value')).toBe(circlesResults[1].label) // nothing created yet expect(createOneToOneConversationAction).not.toHaveBeenCalled() diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index 2eb9a233b..250cb53e6 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -476,7 +476,6 @@ export default { } else { // For other types, show the modal directly this.$refs.newGroupConversation.showModalForItem(item) - this.toggleNewGroupConversation(true) } }, |