Skip to content

Commit

Permalink
Merge pull request #733 from nextcloud/fix/cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Dec 7, 2023
2 parents 30ddf02 + c6ac4af commit 8d51617
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/tables-rows.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:visible').should('not.exist')
cy.get('.custom-table table').contains('My first task').should('exist')
})

Expand All @@ -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:visible').should('not.exist')
cy.get('.custom-table table').contains('Changed column value').should('exist')
})

Expand All @@ -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:visible').should('not.exist')
cy.get('.custom-table table').contains('Changed column value').should('not.exist')
})
})
5 changes: 4 additions & 1 deletion cypress/e2e/tables-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -30,7 +31,8 @@ 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__content').should('be.visible')
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')
Expand All @@ -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()

Expand Down
3 changes: 2 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 8d51617

Please sign in to comment.