Skip to content

Commit

Permalink
Update e2e test to reflect new event feedback logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarnakken committed Oct 28, 2024
1 parent 16c6920 commit 99e68c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cypress/e2e/event_visit_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ describe('View event', () => {
cy.get(c('Modal')).should('not.exist');
});

it('Should be possible to update event details', () => {
cy.visit('/events/20');
it('Should only be possible to update event feedback for events where it is required', () => {
cy.visit('/events/19');
cy.get('#feedback').should('not.exist');

// Update message
cy.visit('/events/20');
cy.contains('button', 'Oppdater').should('be.disabled');
cy.get('#feedback').click().type('This is some feedback text');
cy.get('#feedback').click().type('noe lættis');
cy.contains('button', 'Oppdater').should('not.be.disabled').click();
// We should get a toast confirming
cy.contains('Tilbakemelding oppdatert');
Expand Down

0 comments on commit 99e68c6

Please sign in to comment.