From b920bcaa5b48324c9684546b23833620f5a5298e Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Sun, 3 Mar 2024 13:01:42 +0100 Subject: [PATCH] test: delete table with view Signed-off-by: Cleopatra Enjeck M --- cypress/e2e/view.cy.js | 14 ++++++++++++++ src/modules/main/sections/DataTable.vue | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/view.cy.js b/cypress/e2e/view.cy.js index 530c78392..7c93ef365 100644 --- a/cypress/e2e/view.cy.js +++ b/cypress/e2e/view.cy.js @@ -41,6 +41,20 @@ describe('Interact with views', () => { cy.get('[data-cy="viewSettingsDialogSection"] input').type(title) }) + // cleanup + afterEach(function() { + // delete table (with view) + cy.get('[data-cy="navigationTableItem"]').contains('View test table').click({ force: true }) + cy.get('[data-cy="customTableAction"] button').click() + cy.get('[data-cy="dataTableEditTableBtn"]').contains('Edit table').click() + cy.get('[data-cy="editTableModal"]').should('be.visible') + cy.get('[data-cy="editTableModal"] button').contains('Delete').click() + cy.get('[data-cy="editTableModal"] button').contains('I really want to delete this table!').click() + cy.wait(10).get('.toastify.toast-success').should('be.visible') + cy.get('[data-cy="navigationTableItem"]').contains('View test table').should('not.exist') + cy.get('[data-cy="navigationTableItem"]').contains(title).should('not.exist') + }) + it('Create view and insert rows in the view', () => { // ## add filter cy.get('[data-cy="filterFormFilterGroupBtn"]').contains('Add new filter group').click() diff --git a/src/modules/main/sections/DataTable.vue b/src/modules/main/sections/DataTable.vue index 8b901ff7a..969d86fdb 100644 --- a/src/modules/main/sections/DataTable.vue +++ b/src/modules/main/sections/DataTable.vue @@ -83,7 +83,8 @@