uniswap-interface-uncensored/cypress/e2e/pool.test.ts
eddie 95eafbab7d
fix: wait for page to load in e2e tests (#5983)
* fix: make FoR announcement click optional in e2e tests

* fix: optional chaining

* fix: build error

* fix: wait for page to load
2023-02-15 13:55:35 -08:00

26 lines
621 B
TypeScript

import { getTestSelector } from '../utils'
describe('Pool', () => {
beforeEach(() => {
cy.visit('/pool').then(() => {
cy.wait('@eth_blockNumber')
})
})
it('add liquidity links to /add/ETH', () => {
cy.get('body')
.then((body) => {
if (body.find(getTestSelector('FiatOnrampAnnouncement-close')).length > 0) {
cy.get(getTestSelector('FiatOnrampAnnouncement-close')).click()
}
})
.then(() => {
cy.get('#join-pool-button')
.click()
.then(() => {
cy.url().should('contain', '/add/ETH')
})
})
})
})