Page MenuHomePhabricator

[Cashtab] Update SendToken tests to new standardized wrapper
ClosedPublic

Authored by bytesofman on Feb 27 2024, 13:15.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC9693acd7dc34: [Cashtab] Update SendToken tests to new standardized wrapper
Summary

T3444

Implement new standardized test wrapper in SendToken tests. Stop using data-testid in SendToken tests and delete from SendToken.

Update placeholder text for Burn to improve both the test and the UI.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
update-etoken-tests
Lint
Lint Errors
Unit
No Test Coverage
Build Status
Buildable 27464
Build 54491: Build Diffcashtab-tests
Build 54490: arc lint + arc unit

Event Timeline

PiRK added inline comments.
cashtab/src/components/Send/__tests__/SendToken.test.js
110–127 ↗(On Diff #45669)

This data is duplicated in most tests in this diff, with no differences AFAICT. Can't it be assigned to a variable in the outer scope?

Move repeated pre-test setup to beforeEach

bytesofman added inline comments.
cashtab/src/components/Send/__tests__/SendToken.test.js
110–127 ↗(On Diff #45669)

Good call. I was able to move the mock creation steps there. However, render is not allowed to go in a beforeEach step

This revision is now accepted and ready to land.Feb 27 2024, 21:16
This revision was automatically updated to reflect the committed changes.
bytesofman marked an inline comment as done.