From f5eb414bc326a5349e222d9b17357b55ff3830fa Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Sun, 21 Jan 2024 19:56:30 +0100 Subject: [PATCH] fix(test): modify columm-text-link test Signed-off-by: Cleopatra Enjeck M --- cypress/e2e/column-text-link.cy.js | 6 ++---- cypress/support/commands.js | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/column-text-link.cy.js b/cypress/e2e/column-text-link.cy.js index c3022f3f8..5d11f9e02 100644 --- a/cypress/e2e/column-text-link.cy.js +++ b/cypress/e2e/column-text-link.cy.js @@ -37,8 +37,7 @@ describe('Test column text-link', () => { cy.loadTable('Test text-link') cy.get('.NcTable').contains('Create row').click({ force: true }) - cy.get('.modal__content .slot input').first().type('https://nextcloud.com').tick(500) - cy.get('.icon-label-container .labels').contains('https://nextcloud.com').click() + cy.get('.modal__content .slot input').first().type('https://nextcloud.com') cy.intercept({ method: 'GET', url: '**/search/providers/files/*' }).as('filesResults') cy.get('.modal__content .slot input').eq(1).type('pdf').tick(500) @@ -58,8 +57,7 @@ describe('Test column text-link', () => { cy.loadTable('Test text-link') cy.get('.NcTable tr td button').click({ force: true }) - cy.get('.modal__content .slot input').first().clear().type('https://github.com').tick(500) - cy.get('[data-cy*="github"]').click() + cy.get('.modal__content .slot input').first().clear().type('https://github.com') cy.get('.modal__content .slot input').eq(1).type('photo-test').tick(500) cy.get('[data-cy*="photo-test"]').first().click() diff --git a/cypress/support/commands.js b/cypress/support/commands.js index a6cee5b23..eb67e7048 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -156,7 +156,9 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, isFirstC cy.get('.typeSelection span').contains('Url', { matchCase: false }).click() cy.get('.typeSelection span').contains('Files').click() // TODO is the contacts search provider deactivated by default beginning with nc28 - // cy.get('.typeSelection span label').contains('Contacts').click() + if (['stable27'].includes(Cypress.env('ncVersion'))) { + cy.get('.typeSelection span').contains('Contacts').click() + } ressourceProvider.forEach(provider => cy.get('.typeSelection span').contains(provider, { matchCase: false }).click(),