From 4d7ab2a568301a432c5b32450731443d7f63c5fa Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Fri, 29 Dec 2023 09:48:55 +0100 Subject: [PATCH] clean up Signed-off-by: Cleopatra Enjeck M --- cypress/e2e/tables-table.cy.js | 13 ++-- src/modules/modals/TransferTable.vue | 20 +----- .../NcUserAndGroupPicker.vue | 69 +++++++++---------- 3 files changed, 41 insertions(+), 61 deletions(-) diff --git a/cypress/e2e/tables-table.cy.js b/cypress/e2e/tables-table.cy.js index a5aab2ebf..7e5faaa92 100644 --- a/cypress/e2e/tables-table.cy.js +++ b/cypress/e2e/tables-table.cy.js @@ -1,5 +1,5 @@ let localUser -let user1 +let targetUserTransfer describe('Manage a table', () => { @@ -8,7 +8,7 @@ describe('Manage a table', () => { localUser = user }) cy.createRandomUser().then(user => { - user1 = user + targetUserTransfer = user }) }) @@ -72,10 +72,13 @@ describe('Manage a table', () => { cy.get('[data-cy="editTableModal"] button').contains('Change owner').click() cy.get('[data-cy="editTableModal"]').should('not.exist') cy.get('[data-cy="transferTableModal"]').should('be.visible') - cy.get('[data-cy="transferTableModal"] input[type="search"]').clear().type(user1.userId) - cy.get(`.vs__dropdown-menu [user="${user1.userId}"]`).click() + cy.get('[data-cy="transferTableModal"] input[type="search"]').clear().type(targetUserTransfer.userId) + cy.get(`.vs__dropdown-menu [user="${targetUserTransfer.userId}"]`).click() cy.get('[data-cy="transferTableButton"]').should('be.enabled').click() - cy.wait(10).get('.toastify.toast-success').should('be.visible') + cy.get('.toastify.toast-success').should('be.visible') cy.get('.app-navigation__list').contains('test table').should('not.exist') + cy.login(targetUserTransfer) + cy.visit('apps/tables') + cy.get('.app-navigation__list').contains('test table') }) }) diff --git a/src/modules/modals/TransferTable.vue b/src/modules/modals/TransferTable.vue index 036667462..200245c5c 100644 --- a/src/modules/modals/TransferTable.vue +++ b/src/modules/modals/TransferTable.vue @@ -9,24 +9,11 @@
-
- {{ t('tables', 'Owner') }} -
- - -
- -
-
-
+

{{ t('tables', 'Transfer this table to another user') }}

-
+
{{ t('tables', 'Transfer') }} @@ -90,11 +77,8 @@ export default { }, methods: { actionCancel() { - this.reset() this.$emit('close') }, - reset() { - }, async transferMe() { const transferId = this.table.id let activeTableId diff --git a/src/shared/components/ncUserAndGroupPicker/NcUserAndGroupPicker.vue b/src/shared/components/ncUserAndGroupPicker/NcUserAndGroupPicker.vue index 62774c7c7..345c0c9d9 100644 --- a/src/shared/components/ncUserAndGroupPicker/NcUserAndGroupPicker.vue +++ b/src/shared/components/ncUserAndGroupPicker/NcUserAndGroupPicker.vue @@ -1,7 +1,6 @@