Skip to content

Commit

Permalink
stub request to coingecko to not trigger rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
brymut committed Aug 23, 2024
1 parent 2577528 commit a895965
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ui/cypress/e2e/liquidity.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
describe('Liquidity', () => {
beforeEach(() => {
cy.visit('/liquidity')

cy.intercept("GET", "https://api.coingecko.com/api/v3/simple/price?ids=nation3,ethereum&vs_currencies=usd", {
body: {
"ethereum": {
"usd": 2672.05
},
"nation3": {
"usd": 30.75
}
},
});
});

it('stake: type a deposit amount', () => {
cy.visit('/liquidity')

// Expect default value to be '0'
cy.get('#depositValue')
Expand All @@ -25,8 +38,7 @@ describe('Liquidity', () => {
})

it('unstake: type a withdrawal amount', () => {
cy.visit('/liquidity')


// Click the "Unstake" tab
cy.get("#unstakeTab").click()

Expand Down

0 comments on commit a895965

Please sign in to comment.