Page MenuHomePhabricator

[Cashtab] Add OrderBook (with no icon) to token info page
ClosedPublic

Authored by bytesofman on Sat, Nov 2, 23:19.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCbd14420258ca: [Cashtab] Add OrderBook (with no icon) to token info page
Summary

Add OrderBook component to Token info page. Render it below the summary table and without an icon, as there is no icon.

Add conditional rendering to OrderBook so it can handle the case of no active offers.

Add dedicated component testing for OrderBook to confirm its behavior.

Test Plan

npm test

this diff is live at https://cashtab-local-dev.netlify.app/

image.png (545×468 px, 73 KB)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
memecoin-landing
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30975
Build 61453: Build Diffcashtab-tests
Build 61452: arc lint + arc unit

Event Timeline

Failed tests logs:

====== CashTab Unit Tests: <Agora /> We can see a rendered offer ======
TestingLibraryElementError: Unable to find an element with the text: Cachet (CACHET). 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="sc-bhlBdH byZTTr"
    >
      <div
        class="Toastify"
      />
      <div
        class="sc-AnqlK gvbETP"
      >
        <div
          class="sc-keFjpB fLyXAj"
        >
          <div
            class="sc-chAAoq gOeUUT"
          >
            <img
              alt="cashtab"
              class="sc-dTLGrV coFBhh"
              src="test-file-stub"
            />
          </div>
          <div
            class="sc-gGCbJM QONGh"
          >
            <select
              class="sc-lcpuFF dxrSnr"
              data-testid="wallet-select"
              id="wallets"
              name="wallets"
            >
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Alpha"
              >
                Agora Partial Alpha
              </option>
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Beta"
              >
                Agora Partial Beta
              </option>
            </select>
            <div
              class="sc-ciodno khxwxx"
            >
              <button
                aria-label="Copy ecash:qqpmsv8yh8wwx3lnf92rrc0e6yq97j6zqs8av8vx8h"
                class="sc-cQFLBn jGCEIx"
              >
                <svg
                  title="copy-paste"
                />
              </button>
              <div
                class="sc-gFaPwZ bhfoic"
              >
                <div
                  class="sc-fhYwyz kXwmEk"
                >
                  <input
                    checked=""
                    class="sc-bMvGRv dnGmSn"
                    id="show-hide-balance"
                    name="show-hide-balance"
                    title="show-hide-balance"
                    type="checkbox"
                  />
                  <label
                    class="sc-jzgbtB hsNhPD"
                    for="show-hide-balance"
                  >
                    <span
                      class="sc-gJWqzi dYGNll"
                      data-off=""
                      data-on=""
                    />
                    <span
                      class="sc-rBLzX gWpmmy"
                    />
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div
            class="sc-fHSTwm gtagmW"
            title="Wallet Info"
          >
            <div
              class="sc-crNyjn czvvKH"
              title="Balance in XEC"
            >
              4,200.00
               
              XEC
               
            </div>
            <div
              class="sc-cpHetk dZbjxd"
              title="Balance in Local Currency"
            >
              $
              0.13
               
              USD
            </div>
            <p
              class="sc-nrwXf bnjimB"
              title="Price in Local Currency"
            >
              1 
              XEC
               = 
              0.00003000
               
              USD
            </p>
          </div>
          <div
            class="sc-hycgNl eVPFU"
          >
            <div
              class="sc-dEfkYy ephScI"
              title="Active Offers"
            >
              <div
                class="sc-etwtAo eenSFC"
              >
                <div
                  class="sc-gFaPwZ bhfoic"
                >
                  <div
                    class="sc-fhYwyz kZTqdd"
                  >
                    <input
                      class="sc-bMvGRv dnGmSn"
                      id="Toggle Active Offers"
                      name="Toggle Active Offers"
                      title="Toggle Active Offers"
                      type="checkbox"
                    />
                    <label
                      class="sc-jzgbtB hsNhPD"
                      for="Toggle Active Offers"
                    >
                      <span
                        class="sc-gJWqzi gEydeL"
                        data-off=""
                        data-on=""
                      />
                      <span
                        class="sc-rBLzX hAekJS"
                      />
                    </label>
                  </div>
                </div>
                <div
                  class="sc-hqyNC ctrwFD"
                >
                  Toggle Buy / Manage Listings
                </div>
              </div>
              <div
                class="sc-cqPOvA gwuBes"
              >
                Token Offers
              </div>
              <div
                class="sc-gNJABI hEPFBk"
              >
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div
          class="sc-jWojfa heNGtk"
        >
          <button
            class="sc-jvEmr hNyyAX"
          >
            <svg />
          </button>
          <button
            aria-label="Send Screen"
            class="sc-jvEmr hNyyAX"
            style="padding-bottom: 10px;"
          >
            <div
              class="sc-iwsKbI cuDgAv"
            >
              <svg
                title="tx-sent"
              />
            </div>
          </button>
          <button
            aria-label="Tokens"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="Tokens"
            />
          </button>
          <button
            aria-label="Receive"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="tx-received"
            />
          </button>
          <div
            class="sc-kVrTmx eDxOwS"
            title="Show Other Screens"
          >
            <span
              class="sc-ekkqgF kwBLNi"
            />
            <div
              class="sc-iBmynh iNnluN"
              title="Other Screens"
            >
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallet Backup
                </p>
                <svg
                  title="wallet"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallets
                </p>
                <svg
                  title="wallets"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Listed NFTs
                </p>
                <svg
                  title="NFT"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Agora
                </p>
                <svg
                  title="Meme Agora"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Contacts
                </p>
                <svg
                  title="Contact List"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Airdrop
                </p>
                <svg
                  title="tx-airdrop"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Rewards
                </p>
                <svg
                  title="Cashtab Rewards"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Swap
                </p>
                <svg
                  title="swap"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Sign & Verify
                </p>
                <svg
                  class="sc-htpNat bPFBeM"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Settings
                </p>
                <svg
                  title="settings"
                />
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
    at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
    at Object.getByText (/work/cashtab/src/components/Agora/__tests__/index.test.js:275:23)
====== CashTab Unit Tests: <Agora /> We can see multiple offers, some we made, others we did not, and we can cancel an offer ======
TestingLibraryElementError: Unable to find an element with the text: Cachet (CACHET). 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="sc-bhlBdH byZTTr"
    >
      <div
        class="Toastify"
      />
      <div
        class="sc-AnqlK gvbETP"
      >
        <div
          class="sc-keFjpB fLyXAj"
        >
          <div
            class="sc-chAAoq gOeUUT"
          >
            <img
              alt="cashtab"
              class="sc-dTLGrV coFBhh"
              src="test-file-stub"
            />
          </div>
          <div
            class="sc-gGCbJM QONGh"
          >
            <select
              class="sc-lcpuFF dxrSnr"
              data-testid="wallet-select"
              id="wallets"
              name="wallets"
            >
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Alpha"
              >
                Agora Partial Alpha
              </option>
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Beta"
              >
                Agora Partial Beta
              </option>
            </select>
            <div
              class="sc-ciodno khxwxx"
            >
              <button
                aria-label="Copy ecash:qqpmsv8yh8wwx3lnf92rrc0e6yq97j6zqs8av8vx8h"
                class="sc-cQFLBn jGCEIx"
              >
                <svg
                  title="copy-paste"
                />
              </button>
              <div
                class="sc-gFaPwZ bhfoic"
              >
                <div
                  class="sc-fhYwyz kXwmEk"
                >
                  <input
                    checked=""
                    class="sc-bMvGRv dnGmSn"
                    id="show-hide-balance"
                    name="show-hide-balance"
                    title="show-hide-balance"
                    type="checkbox"
                  />
                  <label
                    class="sc-jzgbtB hsNhPD"
                    for="show-hide-balance"
                  >
                    <span
                      class="sc-gJWqzi dYGNll"
                      data-off=""
                      data-on=""
                    />
                    <span
                      class="sc-rBLzX gWpmmy"
                    />
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div
            class="sc-fHSTwm gtagmW"
            title="Wallet Info"
          >
            <div
              class="sc-crNyjn czvvKH"
              title="Balance in XEC"
            >
              4,200.00
               
              XEC
               
            </div>
            <div
              class="sc-cpHetk dZbjxd"
              title="Balance in Local Currency"
            >
              $
              0.13
               
              USD
            </div>
            <p
              class="sc-nrwXf bnjimB"
              title="Price in Local Currency"
            >
              1 
              XEC
               = 
              0.00003000
               
              USD
            </p>
          </div>
          <div
            class="sc-hycgNl eVPFU"
          >
            <div
              class="sc-dEfkYy ephScI"
              title="Active Offers"
            >
              <div
                class="sc-etwtAo eenSFC"
              >
                <div
                  class="sc-gFaPwZ bhfoic"
                >
                  <div
                    class="sc-fhYwyz kZTqdd"
                  >
                    <input
                      class="sc-bMvGRv dnGmSn"
                      id="Toggle Active Offers"
                      name="Toggle Active Offers"
                      title="Toggle Active Offers"
                      type="checkbox"
                    />
                    <label
                      class="sc-jzgbtB hsNhPD"
                      for="Toggle Active Offers"
                    >
                      <span
                        class="sc-gJWqzi gEydeL"
                        data-off=""
                        data-on=""
                      />
                      <span
                        class="sc-rBLzX hAekJS"
                      />
                    </label>
                  </div>
                </div>
                <div
                  class="sc-hqyNC ctrwFD"
                >
                  Toggle Buy / Manage Listings
                </div>
              </div>
              <div
                class="sc-cqPOvA gwuBes"
              >
                Token Offers
              </div>
              <div
                class="sc-gNJABI hEPFBk"
              >
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div
          class="sc-jWojfa heNGtk"
        >
          <button
            class="sc-jvEmr hNyyAX"
          >
            <svg />
          </button>
          <button
            aria-label="Send Screen"
            class="sc-jvEmr hNyyAX"
            style="padding-bottom: 10px;"
          >
            <div
              class="sc-iwsKbI cuDgAv"
            >
              <svg
                title="tx-sent"
              />
            </div>
          </button>
          <button
            aria-label="Tokens"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="Tokens"
            />
          </button>
          <button
            aria-label="Receive"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="tx-received"
            />
          </button>
          <div
            class="sc-kVrTmx eDxOwS"
            title="Show Other Screens"
          >
            <span
              class="sc-ekkqgF kwBLNi"
            />
            <div
              class="sc-iBmynh iNnluN"
              title="Other Screens"
            >
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallet Backup
                </p>
                <svg
                  title="wallet"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallets
                </p>
                <svg
                  title="wallets"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Listed NFTs
                </p>
                <svg
                  title="NFT"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Agora
                </p>
                <svg
                  title="Meme Agora"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Contacts
                </p>
                <svg
                  title="Contact List"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Airdrop
                </p>
                <svg
                  title="tx-airdrop"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Rewards
                </p>
                <svg
                  title="Cashtab Rewards"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Swap
                </p>
                <svg
                  title="swap"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Sign & Verify
                </p>
                <svg
                  class="sc-htpNat bPFBeM"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Settings
                </p>
                <svg
                  title="settings"
                />
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
    at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
    at Object.getByText (/work/cashtab/src/components/Agora/__tests__/index.test.js:499:23)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:545:9)
    at processTimers (node:internal/timers:519:7)
====== CashTab Unit Tests: <Agora /> We can buy an offer ======
TestingLibraryElementError: Unable to find an element with the text: Cachet (CACHET). 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="sc-bhlBdH byZTTr"
    >
      <div
        class="Toastify"
      />
      <div
        class="sc-AnqlK gvbETP"
      >
        <div
          class="sc-keFjpB fLyXAj"
        >
          <div
            class="sc-chAAoq gOeUUT"
          >
            <img
              alt="cashtab"
              class="sc-dTLGrV coFBhh"
              src="test-file-stub"
            />
          </div>
          <div
            class="sc-gGCbJM QONGh"
          >
            <select
              class="sc-lcpuFF dxrSnr"
              data-testid="wallet-select"
              id="wallets"
              name="wallets"
            >
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Alpha"
              >
                Agora Partial Alpha
              </option>
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Beta"
              >
                Agora Partial Beta
              </option>
            </select>
            <div
              class="sc-ciodno khxwxx"
            >
              <button
                aria-label="Copy ecash:qqpmsv8yh8wwx3lnf92rrc0e6yq97j6zqs8av8vx8h"
                class="sc-cQFLBn jGCEIx"
              >
                <svg
                  title="copy-paste"
                />
              </button>
              <div
                class="sc-gFaPwZ bhfoic"
              >
                <div
                  class="sc-fhYwyz kXwmEk"
                >
                  <input
                    checked=""
                    class="sc-bMvGRv dnGmSn"
                    id="show-hide-balance"
                    name="show-hide-balance"
                    title="show-hide-balance"
                    type="checkbox"
                  />
                  <label
                    class="sc-jzgbtB hsNhPD"
                    for="show-hide-balance"
                  >
                    <span
                      class="sc-gJWqzi dYGNll"
                      data-off=""
                      data-on=""
                    />
                    <span
                      class="sc-rBLzX gWpmmy"
                    />
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div
            class="sc-fHSTwm gtagmW"
            title="Wallet Info"
          >
            <div
              class="sc-crNyjn czvvKH"
              title="Balance in XEC"
            >
              4,200.00
               
              XEC
               
            </div>
            <div
              class="sc-cpHetk dZbjxd"
              title="Balance in Local Currency"
            >
              $
              0.13
               
              USD
            </div>
            <p
              class="sc-nrwXf bnjimB"
              title="Price in Local Currency"
            >
              1 
              XEC
               = 
              0.00003000
               
              USD
            </p>
          </div>
          <div
            class="sc-hycgNl eVPFU"
          >
            <div
              class="sc-dEfkYy ephScI"
              title="Active Offers"
            >
              <div
                class="sc-etwtAo eenSFC"
              >
                <div
                  class="sc-gFaPwZ bhfoic"
                >
                  <div
                    class="sc-fhYwyz kZTqdd"
                  >
                    <input
                      class="sc-bMvGRv dnGmSn"
                      id="Toggle Active Offers"
                      name="Toggle Active Offers"
                      title="Toggle Active Offers"
                      type="checkbox"
                    />
                    <label
                      class="sc-jzgbtB hsNhPD"
                      for="Toggle Active Offers"
                    >
                      <span
                        class="sc-gJWqzi gEydeL"
                        data-off=""
                        data-on=""
                      />
                      <span
                        class="sc-rBLzX hAekJS"
                      />
                    </label>
                  </div>
                </div>
                <div
                  class="sc-hqyNC ctrwFD"
                >
                  Toggle Buy / Manage Listings
                </div>
              </div>
              <div
                class="sc-cqPOvA gwuBes"
              >
                Token Offers
              </div>
              <div
                class="sc-gNJABI hEPFBk"
              >
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div
          class="sc-jWojfa heNGtk"
        >
          <button
            class="sc-jvEmr hNyyAX"
          >
            <svg />
          </button>
          <button
            aria-label="Send Screen"
            class="sc-jvEmr hNyyAX"
            style="padding-bottom: 10px;"
          >
            <div
              class="sc-iwsKbI cuDgAv"
            >
              <svg
                title="tx-sent"
              />
            </div>
          </button>
          <button
            aria-label="Tokens"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="Tokens"
            />
          </button>
          <button
            aria-label="Receive"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="tx-received"
            />
          </button>
          <div
            class="sc-kVrTmx eDxOwS"
            title="Show Other Screens"
          >
            <span
              class="sc-ekkqgF kwBLNi"
            />
            <div
              class="sc-iBmynh iNnluN"
              title="Other Screens"
            >
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallet Backup
                </p>
                <svg
                  title="wallet"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallets
                </p>
                <svg
                  title="wallets"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Listed NFTs
                </p>
                <svg
                  title="NFT"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Agora
                </p>
                <svg
                  title="Meme Agora"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Contacts
                </p>
                <svg
                  title="Contact List"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Airdrop
                </p>
                <svg
                  title="tx-airdrop"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Rewards
                </p>
                <svg
                  title="Cashtab Rewards"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Swap
                </p>
                <svg
                  title="swap"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Sign & Verify
                </p>
                <svg
                  class="sc-htpNat bPFBeM"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Settings
                </p>
                <svg
                  title="settings"
                />
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
    at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
    at Object.getByText (/work/cashtab/src/components/Agora/__tests__/index.test.js:789:23)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:545:9)
    at processTimers (node:internal/timers:519:7)
====== CashTab Unit Tests: <Agora /> We get expected error if we try to buy an offer we cannot afford ======
TestingLibraryElementError: Unable to find an element with the text: Cachet (CACHET). 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="sc-bhlBdH byZTTr"
    >
      <div
        class="Toastify"
      />
      <div
        class="sc-AnqlK gvbETP"
      >
        <div
          class="sc-keFjpB fLyXAj"
        >
          <div
            class="sc-chAAoq gOeUUT"
          >
            <img
              alt="cashtab"
              class="sc-dTLGrV coFBhh"
              src="test-file-stub"
            />
          </div>
          <div
            class="sc-gGCbJM QONGh"
          >
            <select
              class="sc-lcpuFF dxrSnr"
              data-testid="wallet-select"
              id="wallets"
              name="wallets"
            >
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Alpha"
              >
                Agora Partial Alpha
              </option>
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Beta"
              >
                Agora Partial Beta
              </option>
            </select>
            <div
              class="sc-ciodno khxwxx"
            >
              <button
                aria-label="Copy ecash:qqpmsv8yh8wwx3lnf92rrc0e6yq97j6zqs8av8vx8h"
                class="sc-cQFLBn jGCEIx"
              >
                <svg
                  title="copy-paste"
                />
              </button>
              <div
                class="sc-gFaPwZ bhfoic"
              >
                <div
                  class="sc-fhYwyz kXwmEk"
                >
                  <input
                    checked=""
                    class="sc-bMvGRv dnGmSn"
                    id="show-hide-balance"
                    name="show-hide-balance"
                    title="show-hide-balance"
                    type="checkbox"
                  />
                  <label
                    class="sc-jzgbtB hsNhPD"
                    for="show-hide-balance"
                  >
                    <span
                      class="sc-gJWqzi dYGNll"
                      data-off=""
                      data-on=""
                    />
                    <span
                      class="sc-rBLzX gWpmmy"
                    />
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div
            class="sc-fHSTwm gtagmW"
            title="Wallet Info"
          >
            <div
              class="sc-crNyjn czvvKH"
              title="Balance in XEC"
            >
              0.00
               
              XEC
               
            </div>
            <div
              class="sc-cpHetk dZbjxd"
              title="Balance in Local Currency"
            >
              $
              0.00
               
              USD
            </div>
            <p
              class="sc-nrwXf bnjimB"
              title="Price in Local Currency"
            >
              1 
              XEC
               = 
              0.00003000
               
              USD
            </p>
          </div>
          <div
            class="sc-hycgNl eVPFU"
          >
            <div
              class="sc-dEfkYy ephScI"
              title="Active Offers"
            >
              <div
                class="sc-etwtAo eenSFC"
              >
                <div
                  class="sc-gFaPwZ bhfoic"
                >
                  <div
                    class="sc-fhYwyz kZTqdd"
                  >
                    <input
                      class="sc-bMvGRv dnGmSn"
                      id="Toggle Active Offers"
                      name="Toggle Active Offers"
                      title="Toggle Active Offers"
                      type="checkbox"
                    />
                    <label
                      class="sc-jzgbtB hsNhPD"
                      for="Toggle Active Offers"
                    >
                      <span
                        class="sc-gJWqzi gEydeL"
                        data-off=""
                        data-on=""
                      />
                      <span
                        class="sc-rBLzX hAekJS"
                      />
                    </label>
                  </div>
                </div>
                <div
                  class="sc-hqyNC ctrwFD"
                >
                  Toggle Buy / Manage Listings
                </div>
              </div>
              <div
                class="sc-cqPOvA gwuBes"
              >
                Token Offers
              </div>
              <div
                class="sc-gNJABI hEPFBk"
              >
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
                <div
                  class="sc-hIVACf cpJwCl"
                >
                  <div
                    class="sc-kAzzGY gDpRAi"
                    title="Loading"
                  >
                    <div />
                    <div />
                    <div />
                    <div />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div
          class="sc-jWojfa heNGtk"
        >
          <button
            class="sc-jvEmr hNyyAX"
          >
            <svg />
          </button>
          <button
            aria-label="Send Screen"
            class="sc-jvEmr hNyyAX"
            style="padding-bottom: 10px;"
          >
            <div
              class="sc-iwsKbI cuDgAv"
            >
              <svg
                title="tx-sent"
              />
            </div>
          </button>
          <button
            aria-label="Tokens"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="Tokens"
            />
          </button>
          <button
            aria-label="Receive"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="tx-received"
            />
          </button>
          <div
            class="sc-kVrTmx eDxOwS"
            title="Show Other Screens"
          >
            <span
              class="sc-ekkqgF kwBLNi"
            />
            <div
              class="sc-iBmynh iNnluN"
              title="Other Screens"
            >
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallet Backup
                </p>
                <svg
                  title="wallet"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallets
                </p>
                <svg
                  title="wallets"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Listed NFTs
                </p>
                <svg
                  title="NFT"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Agora
                </p>
                <svg
                  title="Meme Agora"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Contacts
                </p>
                <svg
                  title="Contact List"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Airdrop
                </p>
                <svg
                  title="tx-airdrop"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Rewards
                </p>
                <svg
                  title="Cashtab Rewards"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Swap
                </p>
                <svg
                  title="swap"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Sign & Verify
                </p>
                <svg
                  class="sc-htpNat bPFBeM"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Settings
                </p>
                <svg
                  title="settings"
                />
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
    at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
    at Object.getByText (/work/cashtab/src/components/Agora/__tests__/index.test.js:946:23)

Each failure log is accessible here:
CashTab Unit Tests: <Agora /> We can see a rendered offer
CashTab Unit Tests: <Agora /> We can see multiple offers, some we made, others we did not, and we can cancel an offer
CashTab Unit Tests: <Agora /> We can buy an offer
CashTab Unit Tests: <Agora /> We get expected error if we try to buy an offer we cannot afford

remove debug logs, patch test in Agora, add test for Token orderbook and blacklist functionality, blacklist

Failed tests logs:

====== CashTab Unit Tests: <Agora /> We can see multiple offers, some we made, others we did not, and we can cancel an offer ======
TestingLibraryElementError: Unable to find an element with the text: 400.42k XEC. 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="sc-bhlBdH byZTTr"
    >
      <div
        class="Toastify"
      />
      <div
        class="sc-AnqlK gvbETP"
      >
        <div
          class="sc-keFjpB fLyXAj"
        >
          <div
            class="sc-chAAoq gOeUUT"
          >
            <img
              alt="cashtab"
              class="sc-dTLGrV coFBhh"
              src="test-file-stub"
            />
          </div>
          <div
            class="sc-gGCbJM QONGh"
          >
            <select
              class="sc-lcpuFF dxrSnr"
              data-testid="wallet-select"
              id="wallets"
              name="wallets"
            >
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Alpha"
              >
                Agora Partial Alpha
              </option>
              <option
                class="sc-bqjOQT cctRYD"
                value="Agora Partial Beta"
              >
                Agora Partial Beta
              </option>
            </select>
            <div
              class="sc-ciodno khxwxx"
            >
              <button
                aria-label="Copy ecash:qqpmsv8yh8wwx3lnf92rrc0e6yq97j6zqs8av8vx8h"
                class="sc-cQFLBn jGCEIx"
              >
                <svg
                  title="copy-paste"
                />
              </button>
              <div
                class="sc-gFaPwZ bhfoic"
              >
                <div
                  class="sc-fhYwyz kXwmEk"
                >
                  <input
                    checked=""
                    class="sc-bMvGRv dnGmSn"
                    id="show-hide-balance"
                    name="show-hide-balance"
                    title="show-hide-balance"
                    type="checkbox"
                  />
                  <label
                    class="sc-jzgbtB hsNhPD"
                    for="show-hide-balance"
                  >
                    <span
                      class="sc-gJWqzi dYGNll"
                      data-off=""
                      data-on=""
                    />
                    <span
                      class="sc-rBLzX gWpmmy"
                    />
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div
            class="sc-fHSTwm gtagmW"
            title="Wallet Info"
          >
            <div
              class="sc-crNyjn czvvKH"
              title="Balance in XEC"
            >
              4,200.00
               
              XEC
               
            </div>
            <div
              class="sc-cpHetk dZbjxd"
              title="Balance in Local Currency"
            >
              $
              0.13
               
              USD
            </div>
            <p
              class="sc-nrwXf bnjimB"
              title="Price in Local Currency"
            >
              1 
              XEC
               = 
              0.00003000
               
              USD
            </p>
          </div>
          <div
            class="sc-hycgNl eVPFU"
          >
            <div
              class="sc-dEfkYy ephScI"
              title="Active Offers"
            >
              <div
                class="sc-etwtAo eenSFC"
              >
                <div
                  class="sc-gFaPwZ bhfoic"
                >
                  <div
                    class="sc-fhYwyz kZTqdd"
                  >
                    <input
                      class="sc-bMvGRv dnGmSn"
                      id="Toggle Active Offers"
                      name="Toggle Active Offers"
                      title="Toggle Active Offers"
                      type="checkbox"
                    />
                    <label
                      class="sc-jzgbtB hsNhPD"
                      for="Toggle Active Offers"
                    >
                      <span
                        class="sc-gJWqzi gEydeL"
                        data-off=""
                        data-on=""
                      />
                      <span
                        class="sc-rBLzX hAekJS"
                      />
                    </label>
                  </div>
                </div>
                <div
                  class="sc-hqyNC ctrwFD"
                >
                  Toggle Buy / Manage Listings
                </div>
              </div>
              <div
                class="sc-cqPOvA gwuBes"
              >
                Token Offers
              </div>
              <div
                class="sc-gNJABI hEPFBk"
              >
                <div
                  class="sc-gpHHfC iKYzYX"
                >
                  <div
                    class="sc-hjRWVT cOAscz"
                  >
                    Bull
                     (BULL)
                  </div>
                  <div
                    class="sc-hjRWVT cOAscz"
                  >
                    <div
                      class="sc-gVyKpa eXoRKD"
                    >
                      <button
                        aria-label="View larger icon for Bull"
                        class="sc-iybRtq bqQBTg"
                        size="64"
                        title="01d63c4f4cb496829a6743f7b1805d086ea3877a1dd34b3f92ffba2c9c99f896"
                      />
                      <div
                        class="sc-hjRWVT cOAscz"
                      >
                        <div
                          class="sc-hzDEsm fpQdAD"
                        >
                          <a
                            href="https://explorer.e.cash/tx/01d63c4f4cb496829a6743f7b1805d086ea3877a1dd34b3f92ffba2c9c99f896"
                            rel="noopener noreferrer"
                            target="_blank"
                          >
                            01d
                            ...
                            896
                          </a>
                          <button
                            class="sc-cQFLBn jGCEIx"
                          >
                            <svg
                              title="copy-paste"
                            />
                          </button>
                        </div>
                      </div>
                    </div>
                    <div
                      class="sc-eXNvrr hWqxBU"
                    >
                      <button
                        class="sc-cpmKsF ffCcRB"
                      >
                        <div
                          class="sc-kQsIoO gEkBAf"
                        >
                          $1.50 USD
                          <div
                            class="sc-gPzReC cQNVam"
                          />
                          <div
                            class="sc-jrIrqw bDoEmY"
                          />
                        </div>
                      </button>
                    </div>
                  </div>
                  <div
                    class="sc-iQtOjA cwYpHF"
                  >
                    <div
                      class="sc-lhVmIH gvtphN"
                    >
                      <input
                        aria-labelledby="Select buy qty 01d63c4f4cb496829a6743f7b1805d086ea3877a1dd34b3f92ffba2c9c99f896"
                        class="sc-bwCtUz cRbAUS"
                        max="888"
                        min="8"
                        name="Select buy qty 01d63c4f4cb496829a6743f7b1805d086ea3877a1dd34b3f92ffba2c9c99f896"
                        step="1"
                        type="range"
                        value="8"
                      />
                      <div
                        class="sc-esjQYD iHrgtF"
                      />
                    </div>
                  </div>
                  <div
                    class="sc-iQtOjA cwYpHF"
                  >
                    <div
                      class="sc-chbbiW oKWgc"
                    >
                      8
                       
                      <button
                        aria-label="Click for more info about agora partial sales"
                        class="sc-cQFLBn jGCEIx"
                      >
                        <svg
                          title="More Info"
                        />
                      </button>
                    </div>
                  </div>
                  <div
                    class="sc-fHxwqH hgYEtq"
                  >
                    0
                     XEC
                  </div>
                  <div
                    class="sc-fHxwqH hgYEtq"
                  >
                    $0.00 USD
                  </div>
                  <div
                    class="sc-cEvuZC eBEawj"
                  >
                    <button
                      class="sc-hORach sc-GMQeP dRjpLn"
                    >
                      Cancel your offer
                    </button>
                  </div>
                </div>
                <div
                  class="sc-gpHHfC iKYzYX"
                >
                  <div
                    class="sc-hjRWVT cOAscz"
                  >
                    Cachet
                     (CACHET)
                  </div>
                  <div
                    class="sc-hjRWVT cOAscz"
                  >
                    <div
                      class="sc-gVyKpa eXoRKD"
                    >
                      <button
                        aria-label="View larger icon for Cachet"
                        class="sc-iybRtq eeAEPq"
                        size="64"
                        title="aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1"
                      />
                      <div
                        class="sc-hjRWVT cOAscz"
                      >
                        <div
                          class="sc-hzDEsm fpQdAD"
                        >
                          <a
                            href="https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1"
                            rel="noopener noreferrer"
                            target="_blank"
                          >
                            aed
                            ...
                            cb1
                          </a>
                          <button
                            class="sc-cQFLBn jGCEIx"
                          >
                            <svg
                              title="copy-paste"
                            />
                          </button>
                        </div>
                      </div>
                    </div>
                    <div
                      class="sc-eXNvrr hWqxBU"
                    >
                      <button
                        class="sc-cpmKsF ffCcRB"
                      >
                        <div
                          class="sc-kQsIoO gEkBAf"
                        >
                          $0.036 USD
                          <div
                            class="sc-gPzReC fHUWHm"
                          />
                          <div
                            class="sc-jrIrqw bUMsUB"
                          />
                        </div>
                      </button>
                      <button
                        class="sc-cpmKsF eKANcr"
                      >
                        <div
                          class="sc-kQsIoO gEkBAf"
                        >
                          $0.30 USD
                          <div
                            class="sc-gPzReC dyUOzB"
                          />
                        </div>
                      </button>
                      <button
                        class="sc-cpmKsF eKANcr"
                      >
                        <div
                          class="sc-kQsIoO gEkBAf"
                        >
                          $0.36 USD
                          <div
                            class="sc-gPzReC cQNVam"
                          />
                        </div>
                      </button>
                    </div>
                  </div>
                  <div
                    class="sc-iQtOjA cwYpHF"
                  >
                    <div
                      class="sc-lhVmIH gvtphN"
                    >
                      <input
                        aria-labelledby="Select buy qty aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1"
                        class="sc-bwCtUz cRbAUS"
                        max="20000"
                        min="20"
                        name="Select buy qty aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1"
                        step="1"
                        type="range"
                        value="20"
                      />
                      <div
                        class="sc-esjQYD iHrgtF"
                      />
                    </div>
                  </div>
                  <div
                    class="sc-iQtOjA cwYpHF"
                  >
                    <div
                      class="sc-chbbiW oKWgc"
                    >
                      .20
                       
                      <button
                        aria-label="Click for more info about agora partial sales"
                        class="sc-cQFLBn jGCEIx"
                      >
                        <svg
                          title="More Info"
                        />
                      </button>
                    </div>
                  </div>
                  <div
                    class="sc-fHxwqH hgYEtq"
                  >
                    0
                     XEC
                  </div>
                  <div
                    class="sc-fHxwqH hgYEtq"
                  >
                    $0.00 USD
                  </div>
                  <div
                    class="sc-cEvuZC eBEawj"
                  >
                    <button
                      class="sc-hORach sc-GMQeP dRjpLn"
                    >
                      Cancel your offer
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div
          class="sc-jWojfa heNGtk"
        >
          <button
            class="sc-jvEmr hNyyAX"
          >
            <svg />
          </button>
          <button
            aria-label="Send Screen"
            class="sc-jvEmr hNyyAX"
            style="padding-bottom: 10px;"
          >
            <div
              class="sc-iwsKbI cuDgAv"
            >
              <svg
                title="tx-sent"
              />
            </div>
          </button>
          <button
            aria-label="Tokens"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="Tokens"
            />
          </button>
          <button
            aria-label="Receive"
            class="sc-jvEmr hNyyAX"
          >
            <svg
              title="tx-received"
            />
          </button>
          <div
            class="sc-kVrTmx eDxOwS"
            title="Show Other Screens"
          >
            <span
              class="sc-ekkqgF kwBLNi"
            />
            <div
              class="sc-iBmynh iNnluN"
              title="Other Screens"
            >
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallet Backup
                </p>
                <svg
                  title="wallet"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Wallets
                </p>
                <svg
                  title="wallets"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Listed NFTs
                </p>
                <svg
                  title="NFT"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Agora
                </p>
                <svg
                  title="Meme Agora"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Contacts
                </p>
                <svg
                  title="Contact List"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Airdrop
                </p>
                <svg
                  title="tx-airdrop"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Rewards
                </p>
                <svg
                  title="Cashtab Rewards"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                 
                <p>
                  Swap
                </p>
                <svg
                  title="swap"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Sign & Verify
                </p>
                <svg
                  class="sc-htpNat bPFBeM"
                />
              </button>
              <button
                class="sc-fKGOjr kSYpuI"
              >
                <p>
                  Settings
                </p>
                <svg
                  title="settings"
                />
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
    at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
    at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
    at Object.getByText (/work/cashtab/src/components/Agora/__tests__/index.test.js:510:23)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:545:9)
    at processTimers (node:internal/timers:519:7)

Each failure log is accessible here:
CashTab Unit Tests: <Agora /> We can see multiple offers, some we made, others we did not, and we can cancel an offer

bytesofman edited the summary of this revision. (Show Details)

back out unrelated line break

bytesofman published this revision for review.Sun, Nov 3, 04:24

patch unintended css shift (make sure offers stay 100% width on Agora page and landing page)

This revision is now accepted and ready to land.Sun, Nov 3, 11:52