-
Notifications
You must be signed in to change notification settings - Fork 0
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 #804 from madfish-solutions/v3.0.23
V3.0.23
- Loading branch information
Showing
277 changed files
with
4,639 additions
and
1,557 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
# testing | ||
/coverage | ||
/cypress/videos | ||
/cypress/screenshots | ||
|
||
# production | ||
/build | ||
|
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,5 +1,9 @@ | ||
{ | ||
"projectId": "4ytwek", | ||
"baseUrl": "http://localhost:3000/", | ||
"ignoreTestFiles": "**/1-getting-started/*", | ||
"ignoreTestFiles": "**/2-advanced-examples/*" | ||
"defaultCommandTimeout": 10000, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 2 | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const DEFAULT_WAIT_TIMEOUT = 3000; | ||
export const REPEAT_WAIT_TIMEOUT = 10000; |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { DEFAULT_WAIT_TIMEOUT } from '../../const'; | ||
|
||
describe('Input fields are recalculating after entering in another field data', () => { | ||
before(() => { | ||
//before each 'it' go to liquidity tab' | ||
//cy.visit('/liquidity/add/tez-KT19363aZDTjeRyoDkSLZhCk62pS4xfvxo6c_0'); | ||
cy.visit('/'); | ||
cy.get('[data-test-id="header"] [data-test-id="menuButton"]').click(); | ||
cy.get('[data-test-id="menu"] [data-test-id="navigationButton-Liquidity"]').click(); | ||
}); | ||
it('Should_DisplayDataInSecondInput_When_FirstInputIs1', () => { | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="addLiquidityTokenA"]').click().type('1'); | ||
cy.wait(DEFAULT_WAIT_TIMEOUT); | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]') | ||
.invoke('val') | ||
.then(parseFloat) | ||
.should('be.gte', 0); | ||
cy.reload(); | ||
}); | ||
it('Should_DisplayDataInFirstInput_When_SecondInputIs1', () => { | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]').click().type('1'); | ||
cy.wait(DEFAULT_WAIT_TIMEOUT); | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="addLiquidityTokenA"]') | ||
.invoke('val') | ||
.then(parseFloat) | ||
.should('be.gte', 0); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Select different slippage and check if max invested is ok', () => { | ||
before(() => { | ||
//choose 0.5% slippage, check if max invested is greater than input | ||
cy.visit('/'); | ||
cy.get('[data-test-id="header"] [data-test-id="menuButton"]').click(); | ||
cy.get('[data-test-id="menu"] [data-test-id="navigationButton-Liquidity"]').click(); | ||
cy.get('[data-test-id="acceptCookieButton"]').click(); | ||
cy.get('[data-test-id="liquidityPageTokenSelect"] [data-test-id="settingsButton"]').click(); | ||
cy.get('[data-test-id="modalCard"] [data-test-id="slippageLiquidity"] [data-test-id="presetButton-1"]').click() | ||
cy.get('[data-test-id="saveButton"]').click(); | ||
}); | ||
it('Should_DisplayCorrectMaxInvestedB_When_SecondFieldIs15Slippage5', () => { | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="tokenSelectButton"]').click(); | ||
cy.get('[data-test-id="KUSD"]').click(); | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="tokenSelectButton"]').click(); | ||
cy.get('[data-test-id="uUSD"]').click(); | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]').click().type('15'); | ||
cy.contains('[title="15.075"]', '15.075') | ||
.invoke('text').then(parseFloat).should('be.gte', 15); | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]') | ||
.click().type('{backspace}').type('{backspace}'); | ||
}); | ||
it('Should_DisplayCorrectMaxInvestedA_When_FirstFieldIs50Slippage5', () => { | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="addLiquidityTokenA"]').click().type('50'); | ||
cy.contains('[title="50.25"]', '50.25') | ||
.invoke('text').then(parseFloat).should('be.gte', 50); | ||
}); | ||
//choose 10% slippage, check if max invested is greater than input | ||
it('Should_DisplayCorrectMaxInvestedA_When_FirstFieldIs50Slippage10', () => { | ||
cy.get('[data-test-id="liquidityPageTokenSelect"] [data-test-id="settingsButton"]').click(); | ||
cy.get('[data-test-id="modalCard"] [data-test-id="slippageLiquidity"] [data-test-id="presetButton-2"]') | ||
.next().click().type('10') | ||
cy.get('[data-test-id="saveButton"]').click(); | ||
cy.contains('[title="55"]', '55') | ||
.invoke('text').then(parseFloat).should('be.gte', 50); | ||
}); | ||
it('Should_DisplayCorrectMaxInvestedB_When_SecondFieldIs100Slippage10', () => { | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="addLiquidityTokenA"]') | ||
.click().type('{backspace}').type('{backspace}'); | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]').click().type('100'); | ||
cy.contains('[title="110"]', '110') | ||
.invoke('text').then(parseFloat).should('be.gte', 100); | ||
}); | ||
//choose 1% slippage, check if invested is ok | ||
it('Should_DisplayCorrectMaxInvestedA_When_FirstFieldIs1000Slippage1', () => { | ||
cy.get('[data-test-id="liquidityPageTokenSelect"] [data-test-id="settingsButton"]').click(); | ||
cy.get('[data-test-id="modalCard"] [data-test-id="slippageLiquidity"] [data-test-id="presetButton-2"]') | ||
.click() | ||
cy.get('[data-test-id="saveButton"]').click(); | ||
cy.contains('[title="101"]', '101') | ||
.invoke('text').then(parseFloat).should('be.gte', 100); | ||
}); | ||
it('Should_DisplayCorrectMaxInvestedA_When_FirstFieldIs22Slippage1', () => { | ||
cy.get('[data-test-id="addLiquidityTokenB"] [data-test-id="addLiquidityTokenB"]') | ||
.click().type('{backspace}').type('{backspace}').type('{backspace}'); | ||
cy.get('[data-test-id="addLiquidityTokenA"] [data-test-id="addLiquidityTokenA"]').click().type('22'); | ||
cy.contains('[title="22.22"]', '22.22') | ||
.invoke('text').then(parseFloat).should('be.gte', 22); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { DEFAULT_WAIT_TIMEOUT } from '../../const'; | ||
|
||
describe('Remove liquidity tab, calculating field', () => { | ||
before(() => { | ||
// Go to the remove page from home page | ||
cy.visit('/'); | ||
cy.get('[data-test-id="header"] [data-test-id="menuButton"]').click(); | ||
cy.get('[data-test-id="menu"] [data-test-id="navigationButton-Liquidity"]').click(); | ||
cy.get('[data-test-id="liquidityPageTokenSelect"] [data-test-id="cardTab-1"]').click(); | ||
}); | ||
it('Should_DisplayOutputFields_When_InputIs1', () => { | ||
cy.get('[data-test-id="positionSelectInput"]').click().type('1'); | ||
cy.wait(DEFAULT_WAIT_TIMEOUT); | ||
cy.get('[data-test-id="outputA"] [data-test-id="outputA"]').invoke('val').then(parseFloat).should('be.gte', 0); | ||
cy.get('[data-test-id="outputB"] [data-test-id="outputB"]').invoke('val').then(parseFloat).should('be.gte', 0); | ||
}); | ||
//change tez/quipu to kusd/quipu, check if output is kusd/quipu | ||
it('Should_HaveKusdQuipuPair_When_TokenIsChanged', () => { | ||
cy.get( | ||
'[data-test-id="liquidityPageTokenSelect"] [data-test-id="positionSelectInput"] [data-test-id="selectLPButton"]' | ||
).click(); | ||
cy.get('[data-test-id="TEZ"] [data-test-id="checkbox"]').click(); | ||
cy.get('[data-test-id="KUSD"] [data-test-id="checkbox"]').click(); | ||
cy.get('[data-test-id="buttonSelect"]').click(); | ||
cy.get( | ||
'[data-test-id="liquidityPageTokenSelect"] [data-test-id="positionSelectInput"] [data-test-id="selectLPButton"]' | ||
) | ||
.invoke('text') | ||
.should('contain', 'QUIPU / KUSD'); | ||
}); | ||
it('Should_DisplayMaxInvested_When_InputIs1QuipuKusd', () => { | ||
cy.reload(); | ||
cy.get('[data-test-id="positionSelectInput"]').click().type('1'); | ||
cy.get('[data-test-id="acceptCookieButton"]').click(); | ||
cy.wait(DEFAULT_WAIT_TIMEOUT); | ||
cy.get('[data-test-id="amount"]').invoke('text').then(parseFloat).should('be.gte', 0); | ||
cy.get('[data-test-id="amount"]').eq(1).invoke('text').then(parseFloat).should('be.gte', 0); | ||
}); | ||
it('Should_DisplayQuipuKusdInDetailsSection_When_InputIs1', () => { | ||
//Sell price in pool details section 1 quipu | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="amount"]') | ||
.eq(0) | ||
.invoke('text') | ||
.then(parseFloat) | ||
.should('be.eq', 1); | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="rightVisibleCurrency"]') | ||
.eq(0) | ||
.invoke('text') | ||
.should('contain', 'QUIPU'); | ||
//sell price in pool details section =kusd | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="rightVisibleCurrency"]') | ||
.eq(1) | ||
.invoke('text') | ||
.should('contain', 'KUSD'); | ||
//Buy price in pool details section 1kusd = ...quipu | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="amount"]') | ||
.eq(2) | ||
.invoke('text') | ||
.then(parseFloat) | ||
.should('be.eq', 1); | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="rightVisibleCurrency"]') | ||
.eq(2) | ||
.invoke('text') | ||
.should('contain', 'KUSD'); | ||
cy.get('[data-test-id="detailsCardCells"] [data-test-id="rightVisibleCurrency"]') | ||
.eq(3) | ||
.invoke('text') | ||
.should('contain', 'QUIPU'); | ||
}); | ||
it('Should_DisplayNotification_When_PoolDoesntExist', () => { | ||
cy.get( | ||
'[data-test-id="liquidityPageTokenSelect"] [data-test-id="positionSelectInput"] [data-test-id="selectLPButton"]' | ||
).click(); | ||
cy.get('[data-test-id="QUIPU"] [data-test-id="checkbox"]').click(); | ||
cy.get('[data-test-id="WRAP"] [data-test-id="checkbox"]').click(); | ||
cy.get('[data-test-id="buttonSelect"]').click(); | ||
cy.get('[data-test-id="liquidityPageTokenSelect"] [data-test-id="connectButton"]') | ||
.prev() | ||
.should('contain', 'Note! The pool does'); | ||
}); | ||
}); |
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
Oops, something went wrong.