Skip to content

Commit

Permalink
Add extra check to balance test
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Oct 24, 2023
1 parent e4baa63 commit c0ea5b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
6 changes: 5 additions & 1 deletion cypress/component/integration/Balance.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ describe('Component | Integration | Balance', function () {
cy.get('[data-testid="balance"] [data-testid="svg-icon"]').should(
'exist',
);
cy.get('[data-testid="balance"]').should('contain', '0123456.78');

cy.get('[data-testid="balance-amount"]').should(
'contain',
'0123456.78',
);
cy.get('[data-testid="balance-equal"]').should('not.exist');
});

Expand Down
13 changes: 0 additions & 13 deletions src/components/Balance/Balance.test.tsx

This file was deleted.

7 changes: 6 additions & 1 deletion src/components/Balance/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ export function Balance({ ...props }) {
className={`flex items-center w-fit ${customClass}`}
>
<MassaLogo size={logoClass} className={iconClass} />
<label className={`${sizeClass} text-f-primary`}>{amount}</label>
<label
data-testid="balance-amount"
className={`${sizeClass} text-f-primary`}
>
{amount}
</label>
{equal ? (
<label
data-testid="balance-equal"
Expand Down

0 comments on commit c0ea5b9

Please sign in to comment.