2a7b1e7ff0
* chore: upgrade react-router-dom to v6 * migrate Redirect to Navigate * use Routes instead of Switch * migrate useHistory to useNavigate * use To type * use element * work around activeClassName * fix typing for useParams * deduplicate * fix Navigate * add e2e tests * visit /swap directly Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
11 lines
358 B
TypeScript
11 lines
358 B
TypeScript
describe('Redirect', () => {
|
|
it('should redirect to /vote/create-proposal when visiting /create-proposal', () => {
|
|
cy.visit('/create-proposal')
|
|
cy.url().should('match', /\/vote\/create-proposal/)
|
|
})
|
|
it('should redirect to /swap when visiting nonexist url', () => {
|
|
cy.visit('/none-exist-url')
|
|
cy.url().should('match', /\/swap/)
|
|
})
|
|
})
|