Skip to content

Commit

Permalink
adapt cypress to use ocs url for updating tables
Browse files Browse the repository at this point in the history
  • Loading branch information
grnd-alt committed Mar 19, 2024
1 parent bdc9920 commit 3b10e16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/tables-archive.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ describe('Archive tables/views', () => {
cy.get('@tutorialTable').should('contain.text', 'Tutorial')
cy.get('@tutorialTable').find('[aria-haspopup="menu"]').click({ force: true })

cy.intercept({ method: 'PUT', url: '**/apps/tables/table/*'}).as('archiveTableReq')
cy.intercept({ method: 'PUT', url: '**/apps/tables/api/2/tables/*'}).as('archiveTableReq')
cy.contains('Archive table').click({ force: true })

cy.wait('@archiveTableReq').then(request => {
expect(request.response.statusCode).to.equal(200)
expect(request.response.body.archived).to.equal(true)
expect(request.response.body.ocs.data.archived).to.equal(true)
})

cy.get('@tutorialTable').parent().parent().should('contain.text', 'Archived tables')
Expand All @@ -36,12 +36,12 @@ describe('Archive tables/views', () => {
cy.get('@tutorialTable').should('contain.text', 'Tutorial')
cy.get('@tutorialTable').find('[aria-haspopup="menu"]').click({ force: true })

cy.intercept({ method: 'PUT', url: '**/apps/tables/table/*' }).as('unarchiveTableReq')
cy.intercept({ method: 'PUT', url: '**/apps/tables/api/2/tables/*' }).as('unarchiveTableReq')
cy.contains('Unarchive table').click({ force: true })

cy.wait('@unarchiveTableReq').then(request => {
expect(request.response.statusCode).to.equal(200)
expect(request.response.body.archived).to.equal(false)
expect(request.response.body.ocs.data.archived).to.equal(false)
})

cy.get('@tutorialTable').parent().should('contain.text', 'Tables')
Expand Down

0 comments on commit 3b10e16

Please sign in to comment.