Skip to content

Commit

Permalink
improve testing
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek committed Sep 5, 2024
1 parent f5a0f80 commit 2dc58ae
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cypress/e2e/app/transactions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,27 @@ describe('transactions', () => {
cy.get('.transactions-table').should('be.visible')
cy.get('.line-chart').should('be.visible')
cy.get('.transaction-statistics__panel').should('be.visible')
cy.get('.transaction-statistics__panel .chip').should('be.visible')
})

it('should display same transactions after going back from detail', () => {
cy.visit('/transactions')

cy.get('.transactions-table__data').first()
.invoke('text')
.then(hash1 => {
const transactionDetailLink = cy.get('.transactions-table__data').first().find('.u-hidden-mobile a')
transactionDetailLink.click()

cy.get('.copy-chip__text') // workaround to time out before going back get the element

cy.go(-1)

cy.get('.transactions-table__data').first()
.invoke('text')
.should(hash2 => {
expect(hash1).to.eq(hash2)
})
})
})
})

0 comments on commit 2dc58ae

Please sign in to comment.