From 6d7900b62540b6e64c3238ed974c34b7f9729495 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Sun, 8 Dec 2024 08:08:36 +0100 Subject: [PATCH] fix tests --- cypress/e2e/Payment/insufficient-amount-of-tokens.js | 4 ++-- cypress/e2e/Payment/no-payment-options-found.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/Payment/insufficient-amount-of-tokens.js b/cypress/e2e/Payment/insufficient-amount-of-tokens.js index 6a0e8336..f33c16d0 100644 --- a/cypress/e2e/Payment/insufficient-amount-of-tokens.js +++ b/cypress/e2e/Payment/insufficient-amount-of-tokens.js @@ -80,7 +80,7 @@ describe('Payment Widget: insufficient amount of tokens', () => { cy.document().then((document)=>{ DePayWidgets.Payment({ ...defaultArguments, document }) cy.get('.ReactShadowDOMOutsideContainer').shadow().find('.Card').contains('detected').click() - cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'Insufficient Amount') + cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No enough funds!') cy.get('.ReactShadowDOMOutsideContainer').shadow() .find('.Text').should('contain.text', '15 DEPAY are additionally required in order to perform this payment of 20 DEPAY.') cy.get('.ReactShadowDOMOutsideContainer').shadow() .find('.Text').should('contain.text', 'Please top up or swap another token to DEPAY to perform this payment.') cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('button', 'Ok').click() @@ -96,7 +96,7 @@ describe('Payment Widget: insufficient amount of tokens', () => { cy.document().then((document)=>{ DePayWidgets.Payment({ ...defaultArguments, document }) cy.get('.ReactShadowDOMOutsideContainer').shadow().find('.Card').contains('detected').click() - cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'Insufficient Amount') + cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No enough funds!') cy.get('.ReactShadowDOMOutsideContainer').shadow() .find('.Text').should('contain.text', '0.000101 ETH is required in order to perform this payment.') cy.get('.ReactShadowDOMOutsideContainer').shadow() .find('.Text').should('contain.text', 'Please top up your ETH to perform this payment.') cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('button', 'Ok').click() diff --git a/cypress/e2e/Payment/no-payment-options-found.js b/cypress/e2e/Payment/no-payment-options-found.js index 260be7f7..6b6585ab 100644 --- a/cypress/e2e/Payment/no-payment-options-found.js +++ b/cypress/e2e/Payment/no-payment-options-found.js @@ -76,8 +76,8 @@ describe('Payment Widget: no payment options found', () => { cy.document().then((document)=>{ DePayWidgets.Payment({ ...defaultArguments, document }) cy.get('.ReactShadowDOMOutsideContainer').shadow().find('.Card').contains('detected').click() - cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No Payment Option Found') - cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('.Text', 'Correct wallet connected') + cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No enough funds!') + cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('.Text', 'Please make sure you have enough funds') }) }) }) @@ -89,7 +89,7 @@ describe('Payment Widget: no payment options found', () => { cy.document().then((document)=>{ DePayWidgets.Payment({ ...defaultArguments, document }) cy.get('.ReactShadowDOMOutsideContainer').shadow().find('.Card').contains('detected').click() - cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No Payment Option Found') + cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('h1', 'No enough funds!') cy.wait(2000).then(()=>{ USDValueMock_count = USDValueMock.calls.count() TOKENRouteMock_count = TOKENRouteMock.calls.count()