Page MenuHomePhabricator

[Cashtab] Deprecate antd select from Configure screen
ClosedPublic

Authored by bytesofman on Apr 6 2024, 13:49.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC55b009441bd1: [Cashtab] Deprecate antd select from Configure screen
Summary

T2207

Use a custom select component instead of antd. Add a test to confirm it is working as expected.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

remove select from enhancdinputs no longer used

bytesofman published this revision for review.Apr 6 2024, 14:11
emack requested changes to this revision.Sun, Apr 7, 09:02
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/components/Configure/__tests__/Configure.test.js
678 ↗(On Diff #46907)

Add a check that the fiatCurrency setting within cashtabState has been updated.

This revision now requires changes to proceed.Sun, Apr 7, 09:02

test that fiat currency is also updated in localforage on select

bytesofman added inline comments.
cashtab/src/components/Configure/__tests__/Configure.test.js
678 ↗(On Diff #46907)

Since this displayed value is controlled by cashtabState, want to avoid this (testing state directly instead of testing the impact of state on the component).

In general with react testing library, we want to test the result -- i.e. how a component is rendered -- and not state directly. In Cashtab, we only test state directly in useWallet.test.js -- arguably, we could drop that, except it is useful for testing migrations and bootup (while also supplemented by testing the actual components in App.test.js)

ref
https://www.npmjs.com/package/@testing-library/react-hooks#when-not-to-use-this-library

Added a localforage check since that should happen in parallel.

This revision is now accepted and ready to land.Mon, Apr 8, 04:59
This revision was automatically updated to reflect the committed changes.
bytesofman marked an inline comment as done.