Commit 3277d70e authored by Moody Salem's avatar Moody Salem

fix all tests

parent d1a31fe7
describe('Pool', () => { describe('Pool', () => {
beforeEach(() => cy.visit('/#/pool')) beforeEach(() => cy.visit('/pool'))
it('can search for a pool', () => { it('can search for a pool', () => {
cy.get('#join-pool-button').click() cy.get('#join-pool-button').click()
cy.get('#token-search-input').type('DAI', { delay: 200 }) cy.get('#token-search-input').type('DAI', { delay: 200 })
......
describe('Send', () => { describe('Send', () => {
beforeEach(() => cy.visit('/#/send')) beforeEach(() => cy.visit('/send'))
it('can enter an amount into input', () => { it('can enter an amount into input', () => {
cy.get('#sending-no-swap-input') cy.get('#sending-no-swap-input')
......
describe('Swap', () => { describe('Swap', () => {
beforeEach(() => cy.visit('/#/swap')) beforeEach(() => cy.visit('/swap'))
it('can enter an amount into input', () => { it('can enter an amount into input', () => {
cy.get('#swap-currency-input .token-amount-input') cy.get('#swap-currency-input .token-amount-input')
.type('0.001', { delay: 200 }) .type('0.001', { delay: 200 })
......
...@@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge { ...@@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge {
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index // sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
Cypress.Commands.overwrite('visit', (original, url, options) => { Cypress.Commands.overwrite('visit', (original, url, options) => {
return original(url, { return original(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url, {
...options, ...options,
onBeforeLoad(win) { onBeforeLoad(win) {
options && options.onBeforeLoad && options.onBeforeLoad(win) options && options.onBeforeLoad && options.onBeforeLoad(win)
const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467', 4) const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467', 4)
const signer = new Wallet(PRIVATE_KEY_TEST_NEVER_USE, provider) const signer = new Wallet(PRIVATE_KEY_TEST_NEVER_USE, provider)
win.ethereum = new CustomizedBridge(signer, provider) win.ethereum = new CustomizedBridge(signer, provider)
} },
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment