From a32ca26616accb88bbfdeda9e76b9f7c0f2a4711 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 5 Dec 2023 15:23:42 +0100 Subject: [PATCH 1/3] =?UTF-8?q?fix(test):=20deactivate=20the=20deactivatio?= =?UTF-8?q?n=20of=20the=20contacts=20search=20provider=20-=20=E2=81=89?= =?UTF-8?q?=EF=B8=8Fhave=20to=20clarify=20if=20the=20search=20provider=20w?= =?UTF-8?q?ill=20come=20back=20by=20default=20or=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Florian Steffens --- cypress/support/commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 0dc917116..3d05189da 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -98,7 +98,8 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, firstCol // deactivate unwanted provider cy.get('.typeSelection span label').contains('Url', { matchCase: false }).click() cy.get('.typeSelection span label').contains('Files').click() - cy.get('.typeSelection span label').contains('Contacts').click() + // TODO is the contacts search provider deactivated by default beginning with nc28 + // cy.get('.typeSelection span label').contains('Contacts').click() ressourceProvider.forEach(provider => cy.get('.typeSelection span label').contains(provider, { matchCase: false }).click(), From 3315e37bda414e722911429fc692f4bd28bafb25 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Wed, 6 Dec 2023 10:19:43 +0100 Subject: [PATCH 2/3] fix(tests): small adjustments Signed-off-by: Florian Steffens --- cypress/e2e/tables-rows.cy.js | 6 +++--- cypress/e2e/tables-table.cy.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/tables-rows.cy.js b/cypress/e2e/tables-rows.cy.js index 5dba97094..d57c98e4e 100644 --- a/cypress/e2e/tables-rows.cy.js +++ b/cypress/e2e/tables-rows.cy.js @@ -23,7 +23,7 @@ describe('Rows for a table', () => { cy.get('.modal__content [aria-label="Increase stars"]').click().click() cy.get('.modal-container button').contains('Save').click() - cy.get('.modal-container').should('not.exist') + cy.get('.modal-container').should('not.be.visible') cy.get('.custom-table table').contains('My first task').should('exist') }) @@ -34,7 +34,7 @@ describe('Rows for a table', () => { cy.get('.modal__content [aria-label="Increase stars"]').click().click() cy.get('.modal-container button').contains('Save').click() - cy.get('.modal-container').should('not.exist') + cy.get('.modal-container').should('not.be.visible') cy.get('.custom-table table').contains('Changed column value').should('exist') }) @@ -44,7 +44,7 @@ describe('Rows for a table', () => { cy.get('.modal-container button').contains('Delete').click() cy.get('.modal-container button').contains('I really want to delete this row!').click() - cy.get('.modal-container').should('not.exist') + cy.get('.modal-container').should('not.be.visible') cy.get('.custom-table table').contains('Changed column value').should('not.exist') }) }) diff --git a/cypress/e2e/tables-table.cy.js b/cypress/e2e/tables-table.cy.js index e82e489cd..ef21e3e43 100644 --- a/cypress/e2e/tables-table.cy.js +++ b/cypress/e2e/tables-table.cy.js @@ -30,7 +30,7 @@ describe('Manage a table', () => { cy.get('[data-cy="customTableAction"] button').click() cy.get('.action-button__text').contains('Edit table').click() - cy.get('.modal-container input').clear().type('ToDo list') + cy.get('.modal-container input').last().clear().type('ToDo list') cy.get('.modal-container button').contains('Save').click() cy.wait(10).get('.toastify.toast-success').should('be.visible') From c6ac4af67c76817ba344e6d0f873951d4f2e31e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 7 Dec 2023 11:20:39 +0100 Subject: [PATCH 3/3] tests: Wait for modal to be visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/e2e/tables-rows.cy.js | 6 +++--- cypress/e2e/tables-table.cy.js | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/tables-rows.cy.js b/cypress/e2e/tables-rows.cy.js index d57c98e4e..9f9f3613e 100644 --- a/cypress/e2e/tables-rows.cy.js +++ b/cypress/e2e/tables-rows.cy.js @@ -23,7 +23,7 @@ describe('Rows for a table', () => { cy.get('.modal__content [aria-label="Increase stars"]').click().click() cy.get('.modal-container button').contains('Save').click() - cy.get('.modal-container').should('not.be.visible') + cy.get('.modal-container:visible').should('not.exist') cy.get('.custom-table table').contains('My first task').should('exist') }) @@ -34,7 +34,7 @@ describe('Rows for a table', () => { cy.get('.modal__content [aria-label="Increase stars"]').click().click() cy.get('.modal-container button').contains('Save').click() - cy.get('.modal-container').should('not.be.visible') + cy.get('.modal-container:visible').should('not.exist') cy.get('.custom-table table').contains('Changed column value').should('exist') }) @@ -44,7 +44,7 @@ describe('Rows for a table', () => { cy.get('.modal-container button').contains('Delete').click() cy.get('.modal-container button').contains('I really want to delete this row!').click() - cy.get('.modal-container').should('not.be.visible') + cy.get('.modal-container:visible').should('not.exist') cy.get('.custom-table table').contains('Changed column value').should('not.exist') }) }) diff --git a/cypress/e2e/tables-table.cy.js b/cypress/e2e/tables-table.cy.js index ef21e3e43..c4e78bd0b 100644 --- a/cypress/e2e/tables-table.cy.js +++ b/cypress/e2e/tables-table.cy.js @@ -17,6 +17,7 @@ describe('Manage a table', () => { cy.contains('.app-menu-entry--label', 'Tables').click() cy.contains('button', 'Create new table').click() cy.get('.tile').contains('ToDo').click({ force: true }) + cy.get('.modal__content').should('be.visible') cy.get('.modal__content input[type="text"]').clear().type('to do list') cy.contains('button', 'Create table').click() @@ -30,6 +31,7 @@ describe('Manage a table', () => { cy.get('[data-cy="customTableAction"] button').click() cy.get('.action-button__text').contains('Edit table').click() + cy.get('.modal__content').should('be.visible') cy.get('.modal-container input').last().clear().type('ToDo list') cy.get('.modal-container button').contains('Save').click() @@ -42,6 +44,7 @@ describe('Manage a table', () => { cy.get('[data-cy="customTableAction"] button').click() cy.get('.action-button__text').contains('Edit table').click() + cy.get('.modal__content').should('be.visible') cy.get('.modal-container button').contains('Delete').click() cy.get('.modal-container button').contains('I really want to delete this table!').click()