From d8d8fce60b03812f45e0e86a668ae12e34cfe188 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 27 Jun 2023 13:52:35 +0200 Subject: [PATCH] increase wait times for CI testing replace identifier from css to data attribute Signed-off-by: Florian Steffens --- cypress/e2e/column-text-link.cy.js | 10 ++++------ cypress/support/commands.js | 4 +--- src/shared/components/ncTable/partials/TableHeader.vue | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/cypress/e2e/column-text-link.cy.js b/cypress/e2e/column-text-link.cy.js index 2faa36489..79dc61a2d 100644 --- a/cypress/e2e/column-text-link.cy.js +++ b/cypress/e2e/column-text-link.cy.js @@ -13,7 +13,6 @@ describe('Test column text-link', () => { cy.visit('apps/tables') }) - it('Create', () => { cy.createTable('Test text-link') }) @@ -28,13 +27,12 @@ describe('Test column text-link', () => { it('Create row', () => { 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').wait(500).type('{downArrow}{enter}') - + cy.get('.modal__content .slot input').first().type('https://nextcloud.com').wait(510).type('{downArrow}{enter}') cy.intercept({ method: 'GET', url: '**/search/providers/files/*' }).as('filesResults') cy.get('.modal__content .slot input').eq(1).type('pdf') cy.wait('@filesResults') - cy.get('.modal__content .slot input').eq(1).type('{downArrow}').wait(20).type('{enter}') + cy.get('.modal__content .slot input').eq(1).type('{downArrow}').wait(100).type('{enter}') cy.get('.modal-container button').contains('Save').click() @@ -46,8 +44,8 @@ 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').wait(500).type('{downArrow}{enter}') - cy.get('.modal__content .slot input').eq(1).type('photo').wait(1500).type('{downArrow}{downArrow}').wait(500).type('{enter}') + cy.get('.modal__content .slot input').first().clear().type('https://github.com').wait(510).type('{downArrow}{enter}') + cy.get('.modal__content .slot input').eq(1).type('photo').wait(2000).type('{downArrow}{downArrow}').wait(100).type('{enter}') cy.get('.modal-container button').contains('Save').click() cy.get('tr td a').contains('github').should('exist') diff --git a/cypress/support/commands.js b/cypress/support/commands.js index cb4821c64..aa41d931f 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -27,7 +27,6 @@ import { addCommands } from '@nextcloud/cypress' addCommands() - Cypress.Commands.add('createTable', (title) => { cy.contains('.app-menu-entry--label', 'Tables').click() cy.contains('button', 'Create new table').click() @@ -46,7 +45,7 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, firstCol if (firstColumn) { cy.get('.button-vue__text').contains('Create column').click({ force: true }) } else { - cy.get('.customTableAction button').click() + cy.get('[data-cy="customTableAction"] button').click() cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true }) } @@ -66,4 +65,3 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, firstCol cy.wait(10).get('.toastify.toast-success').should('be.visible') cy.get('.custom-table table tr th .cell').contains(title).should('exist') }) - diff --git a/src/shared/components/ncTable/partials/TableHeader.vue b/src/shared/components/ncTable/partials/TableHeader.vue index aac0b4c7f..0b37014e8 100644 --- a/src/shared/components/ncTable/partials/TableHeader.vue +++ b/src/shared/components/ncTable/partials/TableHeader.vue @@ -22,7 +22,7 @@ @delete-filter="id => $emit('delete-filter', id)" /> - +