Skip to content

Commit

Permalink
feat: add e2e tests for routing pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Sep 4, 2023
1 parent 6e517d5 commit 1561f63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('dashboard', () => {
let pageOne
describe('pagination', () => {
it('should display different results on click on arrow', () => {
it('should display different results on click on arrow and change url', () => {
cy.visit('/')
cy.get('gn-ui-record-table')
.find('.record-table-col')
Expand All @@ -17,9 +17,10 @@ describe('dashboard', () => {
.invoke('text')
.then((text) => {
expect(text).not.to.equal(pageOne)
cy.url().should('include', 'page=2')
})
})
it('should display different results on click on specific page', () => {
it('should display different results on click on specific page and change url', () => {
cy.visit('/')
cy.get('gn-ui-pagination-buttons').find('gn-ui-button').eq(1).click()
cy.get('gn-ui-record-table')
Expand All @@ -28,6 +29,7 @@ describe('dashboard', () => {
.invoke('text')
.then((text) => {
expect(text).to.equal(pageOne)
cy.url().should('include', 'page=1')
})
})
})
Expand Down

0 comments on commit 1561f63

Please sign in to comment.