Skip to content

Commit

Permalink
test: update for ci github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendn committed Jun 28, 2023
1 parent ce06831 commit 2f6c2db
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions cypress/e2e/exchange/swap.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,19 @@ describe('Swap', () => {
it('can enter an amount into input', () => {
cy.get('#swap-currency-input .token-amount-input')
.type('0.001', { delay })
.type('0.0', { delay })
.invoke('text')
// tip: use an assertion to print the extracted text
.should('be.a', 'string')
// convert text to integer
.then(parseFloat)
// tip: make sure the conversion is successful
// compare the converted number to the expected value
.should('have.value', '0.001')
.and('equal', 0.001)
})

it('zero swap amount', () => {
cy.get('#swap-currency-input .token-amount-input')
.type('0.0', { delay })
.invoke('text')
// tip: use an assertion to print the extracted text
.should('be.a', 'string')
// convert text to integer
.then(parseFloat)
// tip: make sure the conversion is successful
// compare the converted number to the expected value
.should('have.value', '0.0')
.and('equal', 0)
})

it('invalid swap amount', () => {
Expand All @@ -44,14 +35,12 @@ describe('Swap', () => {
it('zero output amount', () => {
cy.get('#swap-currency-output .token-amount-output')
.type('0.0', { delay })
.invoke('text')
// tip: use an assertion to print the extracted text
.should('be.a', 'string')
// convert text to integer
.then(parseFloat)
// tip: make sure the conversion is successful
// compare the converted number to the expected value
.should('have.value', '0.0')
.and('equal', 0)
})

// This test requires account with some amount of ASA on it
Expand Down

0 comments on commit 2f6c2db

Please sign in to comment.