Skip to content

Commit

Permalink
Add action handler tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boodland committed Aug 30, 2024
1 parent 3275c75 commit 6835cc8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cypress/integration/tests/action-handler.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
describe('Action handler page should redirect visitor to', () => {
const ACTION_HANDLER_URL = '/action-handler?mode=';
const MODE_VALUE = 'resetPassword';

before(() => {
cy.cleanUpTestState();
});

it('reset password page if mode query parameter is resetPassword', () => {
cy.visit(`${ACTION_HANDLER_URL}${MODE_VALUE}`);
cy.checkPageUrl('auth/reset-password');
});
it('not found page if mode query parameters has other value', () => {
const modeValue = 'wrongMode';
cy.visit(`${ACTION_HANDLER_URL}${modeValue}`);
cy.checkPageUrl('404');
});
});

0 comments on commit 6835cc8

Please sign in to comment.