test: fix url param in tests (#6072)

This commit is contained in:
eddie 2023-03-06 10:14:26 -08:00 committed by GitHub
parent 912eb82971
commit b026db3db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

@ -4,7 +4,7 @@ describe('Send', () => {
cy.url().should('include', '/swap')
})
it.skip('should redirect with url params', () => {
it('should redirect with url params', () => {
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz')
cy.url().should('contain', '/swap?outputCurrency=ETH&recipient=bob.argent.xyz')
})

@ -36,7 +36,9 @@ Cypress.Commands.overwrite(
cy.intercept('/service-worker.js', options?.serviceWorker ? undefined : { statusCode: 404 }).then(() => {
original({
...options,
url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=goerli',
url:
(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) +
`${url.includes('?') ? '&' : '?'}chain=goerli`,
onBeforeLoad(win) {
options?.onBeforeLoad?.(win)
win.localStorage.clear()