From b026db3db3e423eaf2c65ad1d72a15f8070a1540 Mon Sep 17 00:00:00 2001 From: eddie <66155195+just-toby@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:14:26 -0800 Subject: [PATCH] test: fix url param in tests (#6072) --- cypress/e2e/send.test.ts | 2 +- cypress/support/e2e.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/send.test.ts b/cypress/e2e/send.test.ts index fa533d3719..35b8dee108 100644 --- a/cypress/e2e/send.test.ts +++ b/cypress/e2e/send.test.ts @@ -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') }) diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index 4d63c52f03..79e3f750eb 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -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()