From 2f6c2dbc236abb41672e746fabd4f0fddd5d7d8e Mon Sep 17 00:00:00 2001 From: tiendn Date: Wed, 28 Jun 2023 09:46:45 +0700 Subject: [PATCH] test: update for ci github action --- cypress/e2e/exchange/swap.cy.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/cypress/e2e/exchange/swap.cy.ts b/cypress/e2e/exchange/swap.cy.ts index 46dfd1f..320a279 100644 --- a/cypress/e2e/exchange/swap.cy.ts +++ b/cypress/e2e/exchange/swap.cy.ts @@ -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', () => { @@ -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