Update all notification logic to call the antd API directly from callsite
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project
- register an available alias and ensure success notification
- malform config/alias.js/aliasServerBaseUrl and ensure error notification upon navigating to alias.js
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- aliasNotif
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 27182 Build 53930: Build Diff cashtab-tests Build 53929: arc lint + arc unit
Event Timeline
Failed tests logs:
====== CashTab Unit Tests: <App /> Adding a contact to an existing contactList by clicking on tx history adds it to localforage and wallet context ====== Error: Unable to perform pointer interaction as the element inherits `pointer-events: none`: DIV <-- This element declared `pointer-events: none` DIV DIV DIV DIV(testId=home-ctn) DIV(testId=tx-history-ctn) DIV DIV(testId=tx-collapse) DIV DIV DIV <-- Asserted pointer events here Ignored nodes: comments, script, style <html> <head /> <body> <div> <div class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa" > <div class="ant-spin-container" > <div class="sc-LKuAh jSXNAo" > <div class="sc-kZmsYB eHkWzo" > <div class="sc-RcBXQ gMCskf" > <div class="sc-hzNEM iiFjIO" > <div class="sc-iSDuPN ccpgHi" > <img alt="cashtab" class="sc-fZwumE bcurWd" src="test-file-stub" /> </div> <div class="sc-elJkPf geNavj" data-testid="wallet-info-ctn" > <div class="sc-dEoRIm iVOOxs" > <div class="sc-jtggT dNidya" > [Burned] useWallet Mock </div> <a href="/configure" > <svg class="sc-jTzLTM bTdWCF" /> </a> <div> <button aria-checked="true" class="ant-switch ant-switch-small css-dev-only-do-not-override-1rqnfsa ant-switch-checked" role="switch" type="button" > <div class="ant-switch-handle" /> <span class="ant-switch-inner" > <span class="ant-switch-inner-checked" > <svg class="sc-cSHVUG bgwEHu" /> </span> <span class="ant-switch-inner-unchecked" > <svg class="sc-kAzzGY fUTkYj" /> </span> </span> </button> </div> </div> <div class="sc-ebFjAB kxaSkj" data-testid="balance-xec" > 10,000.00 XEC </div> <div class="sc-jKVCRD bKzIGa" data-testid="balance-fiat" > $ 0.30 USD </div> <p class="sc-kaNhvL kDOvrh" data-testid="ecash-price" > 1 XEC = 0.00003000 USD </p> </div> </div> <br /> <div class="sc-lhVmIH gJoLAm" data-testid="home-ctn" > <div class="sc-kPVwWT WzIzL" data-testid="tx-history-ctn" > <div> <div class="sc-fYxtnH grnFXT" data-testid="tx-collapse" > <div class="ant-collapse ant-collapse-icon-position-start ant-collapse-borderless css-dev-only-do-not-override-1rqnfsa" > <div class="ant-collapse-item ant-collapse-no-arrow" > <div aria-disabled="false" aria-expanded="false" class="ant-collapse-header" role="button" tabindex="0" > <span class="ant-collapse-header-text" > <div class="sc-jnlKLf cCxHyz" > <div class="sc-Rmtcm sc-fBuWsC hjEaKK... at Object.assertPointerEvents (/work/cashtab/node_modules/@testing-library/user-event/dist/cjs/utils/pointer/cssPointerEvents.js:47:15) at Object.enter (/work/cashtab/node_modules/@testing-library/user-event/dist/cjs/system/pointer/pointer.js:57:34) at PointerHost.move (/work/cashtab/node_modules/@testing-library/user-event/dist/cjs/system/pointer/index.js:50:79) at pointerAction (/work/cashtab/node_modules/@testing-library/user-event/dist/cjs/pointer/index.js:64:39) at Object.pointer (/work/cashtab/node_modules/@testing-library/user-event/dist/cjs/pointer/index.js:32:15) at Object.asyncWrapper (/work/cashtab/node_modules/@testing-library/react/dist/pure.js:88:22) at /work/cashtab/src/components/__tests__/AppIntegrations.test.js:335:13
Each failure log is accessible here:
CashTab Unit Tests: <App /> Adding a contact to an existing contactList by clicking on tx history adds it to localforage and wallet context
Removed draft int test and also patched an uncaught exception when malforming alias server url.
cashtab/src/components/Alias/Alias.js | ||
---|---|---|
127 ↗ | (On Diff #45307) | we shouldn't be doing this (setIsValidAliasInput(false);) instead, we should make sure the Register button is disabled, and a validation msg appears if aliasServerError is set want to avoid manually settting 2 flags that do the same thing when we can just use the one. |
161 ↗ | (On Diff #45307) | ditto prob need to do this patch first |
238 ↗ | (On Diff #45307) | ditto |
cashtab/src/components/Alias/Alias.js | ||
---|---|---|
127 ↗ | (On Diff #45307) | They're two separate use cases though. |
cashtab/src/components/Alias/Alias.js | ||
---|---|---|
127 ↗ | (On Diff #45307) | in this case, we should not setIsValidAliasInput(false) on a price error -- the alias input may still be valid here. it's the price error that should prevent registration. |
-nothing in the test plan confirming how this is not a behavior change
-we are still using this practice in other errors
need a diff that stops doing this throughout this component first, then rebase this onto that