Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Dec 8, 2024
1 parent 5b59525 commit 6d7900b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/Payment/insufficient-amount-of-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/Payment/no-payment-options-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})
})
Expand All @@ -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()
Expand Down

0 comments on commit 6d7900b

Please sign in to comment.