diff --git a/cypress/integration/pool.test.ts b/cypress/integration/pool.test.ts index 144b5b7901..bf7006c3fb 100644 --- a/cypress/integration/pool.test.ts +++ b/cypress/integration/pool.test.ts @@ -1,5 +1,5 @@ describe('Pool', () => { - beforeEach(() => cy.visit('/#/pool')) + beforeEach(() => cy.visit('/pool')) it('can search for a pool', () => { cy.get('#join-pool-button').click() cy.get('#token-search-input').type('DAI', { delay: 200 }) diff --git a/cypress/integration/send.test.ts b/cypress/integration/send.test.ts index 4a50a6ac3f..38d435123f 100644 --- a/cypress/integration/send.test.ts +++ b/cypress/integration/send.test.ts @@ -1,5 +1,5 @@ describe('Send', () => { - beforeEach(() => cy.visit('/#/send')) + beforeEach(() => cy.visit('/send')) it('can enter an amount into input', () => { cy.get('#sending-no-swap-input') diff --git a/cypress/integration/swap.test.ts b/cypress/integration/swap.test.ts index 742f6271f6..eb3b2f74a2 100644 --- a/cypress/integration/swap.test.ts +++ b/cypress/integration/swap.test.ts @@ -1,5 +1,5 @@ describe('Swap', () => { - beforeEach(() => cy.visit('/#/swap')) + beforeEach(() => cy.visit('/swap')) it('can enter an amount into input', () => { cy.get('#swap-currency-input .token-amount-input') .type('0.001', { delay: 200 }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 4cf4659605..68bd8fbeb8 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge { // sets up the injected provider to be a mock ethereum provider with the given mnemonic/index Cypress.Commands.overwrite('visit', (original, url, options) => { - return original(url, { + return original(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url, { ...options, onBeforeLoad(win) { options && options.onBeforeLoad && options.onBeforeLoad(win) const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467', 4) const signer = new Wallet(PRIVATE_KEY_TEST_NEVER_USE, provider) win.ethereum = new CustomizedBridge(signer, provider) - } + }, }) })