Page MenuHomePhabricator

[Cashtab] Patch improper useNavigate usage
ClosedPublic

Authored by bytesofman on Mar 15 2024, 21:15.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC2ccd16af1d64: [Cashtab] Patch improper useNavigate usage
Summary

T3463

Current implementation is from react router 6 migration.

the navigate() function returned from the useNavigate hook should not be called as part of the rendered component. In this case, we want to trigger it when the user sends or burns their whole token balance. So, call it in a useEffect block when this state change occurs.

Remove use from Etokens screen. Getting screens to render Onboarding if the user has no wallet should be done centrally from App.js in another diff (right now, Home and Receive do it, but other screens do not).

Test Plan

npm test

Unfortunately cannot automate this integration test as would require chronik-client to change API calls in the future and respond to websocket msgs or a bridged jest-to-regtest instance (not yet set up). To test manually

  1. Send or burn all of a token
  2. Confirm you are navigated back to home screen
  3. Confirm no error in dev console

Diff Detail

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

Event Timeline

Failed tests logs:

====== CashTab Unit Tests: <SendToken /> Renders the SendToken screen with send address input ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:142:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Accepts a valid ecash: prefixed address ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:175:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Accepts a valid etoken: prefixed address ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:206:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Accepts a valid alias ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:238:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Displays a validation error for an invalid address ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:298:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Displays a validation error for an alias without .xec suffix ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:323:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Displays a validation error for valid alias that has not yet been registered ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:350:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Displays expected error if alias server gives a bad response ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:397:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Displays a validation error if the user includes any query string ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:437:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Renders the send token notification upon successful broadcast ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:475:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
====== CashTab Unit Tests: <SendToken /> Renders the burn token success notification upon successful burn tx broadcast ======
Error: Unable to find an element with the text: BEAR. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="ant-spin-nested-loading css-dev-only-do-not-override-1rqnfsa"
    >
      <div
        class="ant-spin-container"
      >
        <div
          class="sc-kZmsYB fQnjNb"
        >
          <div
            class="sc-iGPElx gCHnuu"
          >
            <div
              class="sc-kasBVs lhkNTc"
            >
              <div
                class="sc-iSDuPN iRujPb"
              >
                <div
                  class="sc-hgHYgh dHoKCw"
                >
                  <img
                    alt="cashtab"
                    class="sc-eInJlc eaQkcG"
                    src="test-file-stub"
                  />
                </div>
                <div
                  class="sc-bYSBpT dbDmUC"
                  data-testid="wallet-info-ctn"
                >
                  <div
                    class="sc-chbbiW htWHZo"
                  >
                    <div
                      class="sc-kxynE kQEGv"
                    >
                      Transaction Fixtures
                    </div>
                    <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-cooIXK Gxkby"
                    data-testid="balance-xec"
                  >
                    9,513.12
                     
                    XEC
                     
                  </div>
                  <div
                    class="sc-fcdeBU eNHrWm"
                    data-testid="balance-fiat"
                  >
                    $
                    0.29
                     
                    USD
                  </div>
                  <p
                    class="sc-gmeYpB ddoKuI"
                    data-testid="ecash-price"
                  >
                    1 
                    XEC
                     = 
                    0.00003000
                     
                    USD
                  </p>
                </div>
              </div>
              <br />
              <div
                class="sc-btzYZH hekFVg"
                data-testid="home-ctn"
              >
                <div
                  class="sc-iQKALj bMXeiW"
                  data-testid="tx-history-ctn"
                >
                  <div>
                    <div
                      class="sc-jnlKLf hjPRhY"
                    >
                      <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-gGBfsJ joaqqL"
                              >
                                <div
                                  class="sc-csuQGl sc-jhAzac hpwXkW"
                                >
                                  <svg />
                                </div>
                                <div
                                  class="sc-TOsTZ fXRuj"
                                  data-testid="left-txt-ctn"
                                >
                                  <div
                                    class="sc-feJyhm ijeuOZ"
                                  >
                                    <h3
                                      class="sc-cHGsZl bHi...
    at waitForWrapper (/work/cashtab/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (/work/cashtab/src/components/Send/__tests__/SendToken.test.js:519:22)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)

Each failure log is accessible here:
CashTab Unit Tests: <SendToken /> Renders the SendToken screen with send address input
CashTab Unit Tests: <SendToken /> Accepts a valid ecash: prefixed address
CashTab Unit Tests: <SendToken /> Accepts a valid etoken: prefixed address
CashTab Unit Tests: <SendToken /> Accepts a valid alias
CashTab Unit Tests: <SendToken /> Displays a validation error for an invalid address
CashTab Unit Tests: <SendToken /> Displays a validation error for an alias without .xec suffix
CashTab Unit Tests: <SendToken /> Displays a validation error for valid alias that has not yet been registered
CashTab Unit Tests: <SendToken /> Displays expected error if alias server gives a bad response
CashTab Unit Tests: <SendToken /> Displays a validation error if the user includes any query string
CashTab Unit Tests: <SendToken /> Renders the send token notification upon successful broadcast
CashTab Unit Tests: <SendToken /> Renders the burn token success notification upon successful burn tx broadcast

make sure you only navigate for the case of a user who had tokens and then did not

bytesofman added inline comments.
cashtab/src/components/Etokens/Etokens.js
79 ↗(On Diff #46233)

This is a nice feature -- navigate to onboarding if no wallet -- but it should be applied in a standardized way across all of Cashtab. Right now it is applied piecemeal in Receive and Home (though there, not with a hacky use of useNavigate, hence they are not touched in this diff).

This revision is now accepted and ready to land.Mar 16 2024, 09:26