Page MenuHomePhabricator

[Cashtab] Update configure.js with direct antd calls
ClosedPublic

Authored by emack on Feb 11 2024, 08:50.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCd129cfb43dc0: [Cashtab] Update configure.js with direct antd calls
Summary

This diff replaces all uses of Notification.js functions in Configure.js with direct calls to the antd notification component.

Integration tests added for key success and error notifications, however does not cover every single permutation otherwise it will clog the test suite. This is because the notification checks occur at the tail end of a very long end to end workflow.

Test Plan

npm test

Diff Detail

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

Event Timeline

emack requested review of this revision.Feb 11 2024, 08:50
bytesofman added inline comments.
cashtab/src/components/Configure/__tests__/Configure.test.js
95–101 ↗(On Diff #45130)

don't need this to be a variable if we are not using it again anywhere

142 ↗(On Diff #45130)

ditto

205 ↗(On Diff #45130)

ditto

245 ↗(On Diff #45130)

ditto

299 ↗(On Diff #45130)

ditto

323 ↗(On Diff #45130)

ditto

415 ↗(On Diff #45130)
480 ↗(On Diff #45130)

ditto

512 ↗(On Diff #45130)

ditto

This revision now requires changes to proceed.Feb 11 2024, 21:12
emack marked 9 inline comments as done.

Updated var usage

Removed single reference var and comment

bytesofman added inline comments.
cashtab/src/components/Configure/Configure.js
891 ↗(On Diff #45143)

see data-testid comments below

989 ↗(On Diff #45143)

we should only use a data-testid if it is impossible or impractical to get this element by its contents

In this case, we should use getByText. From the users perspective, we want to confirm that a notification appears that says ${manualContactAddress} added to Contact List --- not that a notification with a given data-testid appears.

1036 ↗(On Diff #45143)

ditto

1051 ↗(On Diff #45143)

ditto

This revision now requires changes to proceed.Feb 12 2024, 12:45
emack marked 4 inline comments as done.

Updated to use queryByText for elements which are not expected to be rendered and getByText for when it is expected.

This revision is now accepted and ready to land.Feb 13 2024, 10:28