19b1e9e399
* first pass of sdk 3.0 * second pass using weth * kill unused pool popup * get it compiling again * first pass of sdk 3.0 * switch to currencies * get it compiling after the big move merge * restore margin * clean up add liquidity more * fix a bunch of bugs * todo trade on v1 * show eth in currency list * allow selecting eth in the swap page * fix unit tests for swap page * test lint errors * fix failing integration tests * fix another couple of failing unit tests * handle selecting currency b when no currency a * improve the import pool page * clean up add liquidity for invalid pairs * bold * first pass at swap arguments for v1, some unit tests * fix some bugs in add liquidity, burn hook * fix last of ts errors in remove liquidity * support wrapping/unwrapping weth * kill a bunch of code including the dummy pairs * required pair prop in the position card * tests for the v1 swap arguments * do not say estimated on the wrap ui * show ETH instead of WETH in the pool summaries * small size socks * fix lint error * in burn, use currencies from the URL * fix some integration tests * both contain weth * receive eth/weth link * fix empty row * show wrapped only if one currency is weth * currency selects in the remove liquidity page
51 lines
2.4 KiB
TypeScript
51 lines
2.4 KiB
TypeScript
describe('Add Liquidity', () => {
|
|
it('loads the two correct tokens', () => {
|
|
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
|
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
|
|
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
|
|
})
|
|
|
|
it('does not crash if ETH is duplicated', () => {
|
|
cy.visit('/add/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
|
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'ETH')
|
|
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('not.contain.text', 'ETH')
|
|
})
|
|
|
|
it('token not in storage is loaded', () => {
|
|
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
|
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
|
|
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'MKR')
|
|
})
|
|
|
|
it('single token can be selected', () => {
|
|
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d')
|
|
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
|
|
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
|
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
|
|
})
|
|
|
|
it('redirects /add/token-token to add/token/token', () => {
|
|
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
|
cy.url().should(
|
|
'contain',
|
|
'/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'
|
|
)
|
|
})
|
|
|
|
it('redirects /add/WETH-token to /add/WETH-address/token', () => {
|
|
cy.visit('/add/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
|
cy.url().should(
|
|
'contain',
|
|
'/add/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'
|
|
)
|
|
})
|
|
|
|
it('redirects /add/token-WETH to /add/token/WETH-address', () => {
|
|
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
|
cy.url().should(
|
|
'contain',
|
|
'/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab'
|
|
)
|
|
})
|
|
})
|