-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from QuickSwap/dev
Dev
- Loading branch information
Showing
83 changed files
with
3,304 additions
and
8,635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,56 @@ | ||
describe('Add Liquidity', () => { | ||
it('loads the two correct tokens', () => { | ||
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6¤cy1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619') | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC') | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH') | ||
}) | ||
cy.visit( | ||
'/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6¤cy1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', | ||
); | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should( | ||
'contain.text', | ||
'WBTC', | ||
); | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should( | ||
'contain.text', | ||
'ETH', | ||
); | ||
}); | ||
|
||
it('does not crash if ETH is duplicated', () => { | ||
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619¤cy1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619') | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('not.contain.text', 'ETH') | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH') | ||
}) | ||
cy.visit( | ||
'/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619¤cy1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', | ||
); | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should( | ||
'not.contain.text', | ||
'ETH', | ||
); | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should( | ||
'contain.text', | ||
'ETH', | ||
); | ||
}); | ||
|
||
it('token not in storage is loaded', () => { | ||
cy.visit('/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23¤cy1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05') | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MEEB') | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'IMX') | ||
}) | ||
cy.visit( | ||
'/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23¤cy1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05', | ||
); | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should( | ||
'contain.text', | ||
'MEEB', | ||
); | ||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should( | ||
'contain.text', | ||
'IMX', | ||
); | ||
}); | ||
|
||
it('single token can be selected', () => { | ||
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6') | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC') | ||
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619') | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'ETH') | ||
}) | ||
}) | ||
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6'); | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should( | ||
'contain.text', | ||
'WBTC', | ||
); | ||
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619'); | ||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should( | ||
'contain.text', | ||
'ETH', | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands' | ||
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands'; | ||
|
||
describe('Landing Page', () => { | ||
beforeEach(() => cy.visit('/')) | ||
beforeEach(() => cy.visit('/')); | ||
it('loads landing page', () => { | ||
cy.get('#landing-page') | ||
}) | ||
|
||
cy.get('#landing-page'); | ||
}); | ||
|
||
it('allows navigation to pool', () => { | ||
cy.get('#pools-page-link').click() | ||
cy.url().should('include', '/pools') | ||
}) | ||
cy.get('#pools-page-link').click(); | ||
cy.url().should('include', '/pools'); | ||
}); | ||
|
||
it('allows navigation to swap', () => { | ||
cy.get('#swap-page-link').click() | ||
cy.url().should('include', '/swap') | ||
}) | ||
cy.get('#swap-page-link').click(); | ||
cy.url().should('include', '/swap'); | ||
}); | ||
|
||
it('allows navigation to farm', () => { | ||
cy.get('#farm-page-link').click() | ||
cy.url().should('include', '/farm') | ||
}) | ||
cy.get('#farm-page-link').click(); | ||
cy.url().should('include', '/farm'); | ||
}); | ||
|
||
it('allows navigation to dragons lair', () => { | ||
cy.get('#dragons-page-link').click() | ||
cy.url().should('include', '/dragons') | ||
}) | ||
cy.get('#dragons-page-link').click(); | ||
cy.url().should('include', '/dragons'); | ||
}); | ||
|
||
it('allows navigation to analytics', () => { | ||
cy.get('#analytics-page-link').click() | ||
cy.url().should('include', '/analytics') | ||
}) | ||
cy.get('#analytics-page-link').click(); | ||
cy.url().should('include', '/analytics'); | ||
}); | ||
|
||
/**it('is connected', () => { | ||
cy.get('#web3-status-connected').click() | ||
cy.get('#web3-account-identifier-row').contains(TEST_ADDRESS_NEVER_USE_SHORTENED) | ||
})*/ | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
describe('Lists', () => { | ||
beforeEach(() => { | ||
cy.visit('/swap') | ||
}) | ||
cy.visit('/swap'); | ||
}); | ||
|
||
it('defaults to uniswap list', () => { | ||
cy.get('#swap-currency-output .open-currency-select-button').click() | ||
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap') | ||
}) | ||
cy.get('#swap-currency-output .open-currency-select-button').click(); | ||
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap'); | ||
}); | ||
|
||
it('change list', () => { | ||
cy.get('#swap-currency-output .open-currency-select-button').click() | ||
cy.get('#currency-search-change-list-button').click() | ||
cy.get('#list-row-tokens-1inch-eth .select-button').click() | ||
cy.get('#currency-search-selected-list-name').should('contain', '1inch') | ||
cy.get('#currency-search-change-list-button').click() | ||
cy.get('#list-row-tokens-uniswap-eth .select-button').click() | ||
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap') | ||
}) | ||
}) | ||
cy.get('#swap-currency-output .open-currency-select-button').click(); | ||
cy.get('#currency-search-change-list-button').click(); | ||
cy.get('#list-row-tokens-1inch-eth .select-button').click(); | ||
cy.get('#currency-search-selected-list-name').should('contain', '1inch'); | ||
cy.get('#currency-search-change-list-button').click(); | ||
cy.get('#list-row-tokens-uniswap-eth .select-button').click(); | ||
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
describe('Migrate V1 Liquidity', () => { | ||
describe('Remove V1 liquidity', () => { | ||
it('renders the correct page', () => { | ||
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36') | ||
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH') | ||
}) | ||
}) | ||
}) | ||
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36'); | ||
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
describe('Pool', () => { | ||
beforeEach(() => cy.visit('/pool')) | ||
beforeEach(() => cy.visit('/pool')); | ||
it('add liquidity links to /add/ETH', () => { | ||
cy.get('#join-pool-button').click() | ||
cy.url().should('contain', '/add/ETH') | ||
}) | ||
cy.get('#join-pool-button').click(); | ||
cy.url().should('contain', '/add/ETH'); | ||
}); | ||
|
||
it('import pool links to /import', () => { | ||
cy.get('#import-pool-link').click() | ||
cy.url().should('contain', '/find') | ||
}) | ||
}) | ||
cy.get('#import-pool-link').click(); | ||
cy.url().should('contain', '/find'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,47 @@ | ||
describe('Remove Liquidity', () => { | ||
it('redirects', () => { | ||
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') | ||
cy.visit( | ||
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85', | ||
); | ||
cy.url().should( | ||
'contain', | ||
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85' | ||
) | ||
}) | ||
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85', | ||
); | ||
}); | ||
|
||
it('eth remove', () => { | ||
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH') | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR') | ||
}) | ||
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'); | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH'); | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR'); | ||
}); | ||
|
||
it('eth remove swap order', () => { | ||
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH') | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR') | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH') | ||
}) | ||
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH'); | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR'); | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH'); | ||
}); | ||
|
||
it('loads the two correct tokens', () => { | ||
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH') | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR') | ||
}) | ||
cy.visit( | ||
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85', | ||
); | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH'); | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR'); | ||
}); | ||
|
||
it('does not crash if ETH is duplicated', () => { | ||
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab') | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH') | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH') | ||
}) | ||
cy.visit( | ||
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab', | ||
); | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH'); | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH'); | ||
}); | ||
|
||
it('token not in storage is loaded', () => { | ||
cy.visit('/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85') | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL') | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR') | ||
}) | ||
}) | ||
cy.visit( | ||
'/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85', | ||
); | ||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL'); | ||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
describe('Send', () => { | ||
it('should redirect', () => { | ||
cy.visit('/send') | ||
cy.url().should('include', '/swap') | ||
}) | ||
cy.visit('/send'); | ||
cy.url().should('include', '/swap'); | ||
}); | ||
|
||
it('should redirect with url params', () => { | ||
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz') | ||
cy.url().should('contain', '/swap?outputCurrency=ETH&recipient=bob.argent.xyz') | ||
}) | ||
}) | ||
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz'); | ||
cy.url().should( | ||
'contain', | ||
'/swap?outputCurrency=ETH&recipient=bob.argent.xyz', | ||
); | ||
}); | ||
}); |
Oops, something went wrong.