2020-05-21 06:31:05 +03:00
|
|
|
describe('Add Liquidity', () => {
|
2020-05-21 06:45:49 +03:00
|
|
|
it('loads the two correct tokens', () => {
|
2020-05-21 06:31:05 +03:00
|
|
|
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
2020-05-27 18:42:25 +03:00
|
|
|
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')
|
2020-05-21 06:45:49 +03:00
|
|
|
})
|
2020-05-21 06:31:05 +03:00
|
|
|
|
2020-05-21 06:45:49 +03:00
|
|
|
it('does not crash if ETH is duplicated', () => {
|
|
|
|
cy.visit('/add/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
2020-05-27 18:42:25 +03:00
|
|
|
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')
|
2020-05-21 06:45:49 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
it('token not in storage is loaded', () => {
|
|
|
|
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
2020-05-27 18:42:25 +03:00
|
|
|
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')
|
2020-05-21 06:31:05 +03:00
|
|
|
})
|
2020-07-10 22:25:15 +03:00
|
|
|
|
|
|
|
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'
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
2020-07-20 14:48:42 +03:00
|
|
|
it('redirects /add/WETH-token to /add/WETH-address/token', () => {
|
2020-07-10 22:25:15 +03:00
|
|
|
cy.visit('/add/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
2020-07-20 14:48:42 +03:00
|
|
|
cy.url().should(
|
|
|
|
'contain',
|
|
|
|
'/add/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'
|
|
|
|
)
|
2020-07-10 22:25:15 +03:00
|
|
|
})
|
|
|
|
|
2020-07-20 14:48:42 +03:00
|
|
|
it('redirects /add/token-WETH to /add/token/WETH-address', () => {
|
2020-07-10 22:25:15 +03:00
|
|
|
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85-0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
2020-07-20 14:48:42 +03:00
|
|
|
cy.url().should(
|
|
|
|
'contain',
|
|
|
|
'/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab'
|
|
|
|
)
|
2020-07-10 22:25:15 +03:00
|
|
|
})
|
2020-05-21 06:31:05 +03:00
|
|
|
})
|