Skip to content

Commit

Permalink
increase wait times for CI testing
Browse files Browse the repository at this point in the history
replace identifier from css to data attribute

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
  • Loading branch information
Florian Steffens committed Jun 27, 2023
1 parent 20d1809 commit d8d8fce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 4 additions & 6 deletions cypress/e2e/column-text-link.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe('Test column text-link', () => {
cy.visit('apps/tables')
})


it('Create', () => {
cy.createTable('Test text-link')
})
Expand All @@ -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()

Expand All @@ -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')
Expand Down
4 changes: 1 addition & 3 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 })
}

Expand All @@ -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')
})

2 changes: 1 addition & 1 deletion src/shared/components/ncTable/partials/TableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@delete-filter="id => $emit('delete-filter', id)" />
</div>
</th>
<th class="customTableAction">
<th data-cy="customTableAction">
<NcActions :force-menu="true">
<NcActionButton v-if="canCreateRowInTable(table)"
:close-after-click="true"
Expand Down

0 comments on commit d8d8fce

Please sign in to comment.