Skip to content

Commit

Permalink
Add test for dupicate next and previous buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
clari182 committed Apr 23, 2024
1 parent add045e commit 47acadc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions site/gatsby-site/cypress/e2e/integration/cite.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ describe('Cite pages', () => {
cy.contains('Previous Incident').should('be.visible').should('have.attr', 'href', '/cite/9');
});

it('Should render Next and Previous incident buttons if duplicate incident', () => {
cy.visit('/cite/90');

cy.contains('Next Incident').should('be.visible').should('have.attr', 'href', '/cite/91');

cy.contains('Previous Incident').should('be.visible').should('have.attr', 'href', '/cite/89');
});

it('Should disable Previous and Next incident buttons on first and last incidents', () => {
cy.visit('/cite/1');

Expand Down

0 comments on commit 47acadc

Please sign in to comment.