Skip to content
GitHub Actions / jest-github-action failed Feb 2, 2024 in 0s

Jest tests failed

Failed tests: 2/284. Failed suites: 2/36.

Details

  ● <Welcome> › Should render Welcome container

    TestingLibraryElementError: Unable to find an element with the text: Welcome to Celo Safe.. 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>
        <main
          class="page center"
        >
          <div
            class="block"
          >
            <h3
              class="sc-hHEiqL kxGwVw"
            >
              Welcome to Celo Safe
              <span
                class="sc-jUfyBS cpktHl"
              >
                 BETA
              </span>
            </h3>
            <h5
              class="sc-kfYoZR ilVsuP"
            >
              Celo Safe is a platform to manage digital assets on the Celo blockchain forked from
               
              <a
                href="https://gnosis.io/safe/"
                rel="noreferrer"
                target="_blank"
              >
                Gnosis Safe.
              </a>
               
              <br />
               Here is how to get started:
               
            </h5>
            <div
              class="sc-amiJK fAsjnV"
            >
              <div
                class="sc-bdnxRM dLzDRg sc-hmbstg ikiOkm"
              >
                <div
                  class="sc-kHWWYL kxeAat"
                >
                  <div
                    class="sc-gKAaRy hHycnu"
                    color="primary"
                  >
                    <h5
                      class="sc-kfYoZR ilVsuP"
                    >
                      1
                    </h5>
                  </div>
                  <h4
                    class="sc-dlMDgC fmHXHh sc-hOPeYd kcKrfD"
                  >
                    Connect wallet
                  </h4>
                </div>
                <p
                  class="sc-crzoAE UIyUn"
                >
                  Celo Safe supports a wide range of wallets that you can choose to interact with your Safe.
                </p>
                <button
                  class="sc-cxNHIi cZRdNE sc-daBunf fcunEo"
                  color="primary"
                >
                  <span
                    class="sc-iqAclL csKvIw"
                    color="primary"
                  >
                    <svg
                      height="16"
                      viewBox="0 0 16 16"
                      width="16"
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <g
                        fill="none"
                        fill-rule="evenodd"
                      >
                        <path
                          d="M0 0H16V16H0z"
                        />
                        <path
                          class="icon-color"
                          d="M13 13v-2c0-.552.448-1 1-1s1 .448 1 1v2c0 1.105-.895 2-2 2H3c-1.105 0-2-.895-2-2V3c0-1.105.895-2 2-2h2c.552 0 1 .448 1 1s-.448 1-1 1H3v10h10z"
                          fill-rule="nonzero"
                        />
                        <path
                          class="icon-color"
                          d="M11.586 3H9c-.552 0-1-.448-1-1s.448-1 1-1h5c.276 0 .526.112.707.293.181.18.293.43.293.707v5c0 .552-.448 1-1 1s-1-.448-1-1V4.414l-6.243 6.243c-.39.39-1.023.39-1.414 0-.39-.39-.39-1.024 0-1.414L11.586 3z"
                        />
                      </g>
                    </svg>
                  </span>
                  <p
                    class="sc-crzoAE ezYmxP sc-lmgQwP iRbvqn"
                    color="primary"
                  >
                    <a
                      class="sc-giAqHp hafODe"
                      href="https://help.gnosis-safe.io/en/articles/4689442-why-do-i-need-to-connect-a-wallet"
                      rel="noopener noreferrer"
                      target="_blank"
                      title="More info about: Why do I need to connect a wallet?"
                    >
                      Why do I need to connect a wallet?
                    </a>
                  </p>
                </button>
                <button
                  class="MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm iVtOgQ sc-bTDOke iZtCvR"
                  data-testid="connect-btn"
                  tabindex="0"
                  type="button"
                >
                  <span
                    class="MuiButton-label"
                  >
                    <p
                      class="sc-crzoAE cDTggs"
                      color="white"
                    >
                      Connect wallet
                    </p>
                  </span>
                  <span
                    class="MuiTouchRipple-root"
                  />
                </button>
              </div>
              <div
                class="sc-bdnxRM dLzDRg sc-jOFryr eROAGc"
              >
                <div
                  class="sc-gtsrHT hVABEH"
                />
                <div
                  class="sc-eKYRIR jxwfCG"
                >
                  <div
                    class="sc-kHWWYL kxeAat"
                  >
                    <div
                      class="sc-gKAaRy hHycnu"
                      color="primary"
                    >
                      <h5
                        class="sc-kfYoZR ilVsuP"
                      >
                        2
                      </h5>
                    </div>
                    <h4
                      class="sc-dlMDgC fmHXHh sc-hOPeYd kcKrfD"
                    >
                      Create Safe
                    </h4>
                  </div>
                  <p
                    class="sc-crzoAE UIyUn"
                  >
                    Create a new Safe that is controlled by one or multiple owners. 
                    <br />
                    You will be required to pay a network fee for creating your new Safe.
                  </p>
                  <a
                    aria-disabled="false"
                    class="link regular MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm iVtOgQ sc-bTDOke iZtCvR"
                    href="#/open"
                    role="button"
                    tabindex="0"
                  >
                    <span
                      class="MuiButton-label"
                    >
                      <p
                        class="sc-crzoAE cDTggs"
                        color="white"
                      >
                        + Create new Safe
                      </p>
                    </span>
                    <span
                      class="MuiTouchRipple-root"
                    />
                  </a>
                </div>
                <div
                  class="sc-jSFjdj dRqwzs"
                />
                <div
                  class="sc-eKYRIR jxwfCG"
                >
                  <h4
                    class="sc-dlMDgC fmHXHh sc-dsXzNU dosRAy"
                  >
                    Add existing Safe
                  </h4>
                  <p
                    class="sc-crzoAE UIyUn"
                  >
                    Already have a Safe? Do you want to access your Safe from a different device? Easily add it using your Safe address.
                  </p>
                  <a
                    aria-disabled="false"
                    class="link regular MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm SioJh sc-bTDOke iZtCvR"
                    href="#/load"
                    role="button"
                    tabindex="0"
                  >
                    <span
                      class="MuiButton-label"
                    >
                      <span
                        class="sc-iqAclL hWlKVA sc-bCwfaz cWDlJU"
                      >
                        <svg
                          height="16"
                          viewBox="0 0 16 16"
                          width="16"
                          xmlns="http://www.w3.org/2000/svg"
                        >
                          <g
                            fill="none"
                            fill-rule="evenodd"
                          >
                            <path
                              d="M0 0H16V16H0z"
                            />
                            <path
                              d="M13 3c1.054 0 1.918.816 1.994 1.85l.005.15v6c0 1.054-.815 1.918-1.85 1.994l-.148.007c0 .512-.386.935-.884.993l-.117.007c-.552 0-1-.448-1-1H5c0 .512-.386.935-.883.993L4 14.001c-.553 0-1-.448-1-1-1.054-.001-1.919-.817-1.995-1.852L1 11V5c0-1.053.816-1.917 1.85-1.994L3 3h10zm0 2H3v6h10V5z"
                              fill="#B2B5B2"
                            />
                            <path
                              d="M10.49 6.5c-.827 0-1.5.672-1.5 1.5s.673 1.5 1.5 1.5c.83 0 1.5-.672 1.5-1.5s-.67-1.5-1.5-1.5"
                              fill="#B2B5B2"
                            />
                          </g>
                        </svg>
                      </span>
                      <p
                        class="sc-crzoAE UIyUn"
                        color="secondary"
                      >
                        Add existing Safe
                      </p>
                    </span>
                    <span
                      class="MuiTouchRipple-root"
                    />
                  </a>
                </div>
              </div>
            </div>
          </div>
        </main>
      </div>
    </body>

       7 |     render(<Welcome />)
       8 |
    >  9 |     expect(screen.getByText('Welcome to Celo Safe.')).toBeInTheDocument()
         |                   ^
      10 |   })
      11 |
      12 |   it('Connect wallet button should not be disabled if no wallet is selected', () => {

      at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
      at node_modules/@testing-library/dom/dist/query-helpers.js:90:38
      at node_modules/@testing-library/dom/dist/query-helpers.js:62:17
      at getByText (node_modules/@testing-library/dom/dist/query-helpers.js:111:19)
      at Object.<anonymous> (src/routes/welcome/Welcome.test.tsx:9:19)

  ● fetchTokenCurrenciesBalances › Given a safe address, calls the API and returns token balances

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "http://localhost:8001/v1", "44787", "0xdfA693da0D16F5E7E78FdCBeDe8FC6eBEa44f1Cf", "USD", {"exclude_spam": true, "trusted": false}

    Number of calls: 0

      18 |     })
      19 |
    > 20 |     expect(getBalances).toHaveBeenCalledWith(
         |                         ^
      21 |       `http://localhost:8001/v1`,
      22 |       getNetworkId().toString(),
      23 |       '0xdfA693da0D16F5E7E78FdCBeDe8FC6eBEa44f1Cf',

      at Object.<anonymous> (src/logic/safe/api/__tests__/fetchTokenCurrenciesBalances.test.ts:20:25)

Annotations

Check failure on line 6 in src/routes/welcome/Welcome.test.tsx

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

<Welcome> > Should render Welcome container

TestingLibraryElementError: Unable to find an element with the text: Welcome to Celo Safe.. 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>
    <main
      class="page center"
    >
      <div
        class="block"
      >
        <h3
          class="sc-hHEiqL kxGwVw"
        >
          Welcome to Celo Safe
          <span
            class="sc-jUfyBS cpktHl"
          >
             BETA
          </span>
        </h3>
        <h5
          class="sc-kfYoZR ilVsuP"
        >
          Celo Safe is a platform to manage digital assets on the Celo blockchain forked from
           
          <a
            href="https://gnosis.io/safe/"
            rel="noreferrer"
            target="_blank"
          >
            Gnosis Safe.
          </a>
           
          <br />
           Here is how to get started:
           
        </h5>
        <div
          class="sc-amiJK fAsjnV"
        >
          <div
            class="sc-bdnxRM dLzDRg sc-hmbstg ikiOkm"
          >
            <div
              class="sc-kHWWYL kxeAat"
            >
              <div
                class="sc-gKAaRy hHycnu"
                color="primary"
              >
                <h5
                  class="sc-kfYoZR ilVsuP"
                >
                  1
                </h5>
              </div>
              <h4
                class="sc-dlMDgC fmHXHh sc-hOPeYd kcKrfD"
              >
                Connect wallet
              </h4>
            </div>
            <p
              class="sc-crzoAE UIyUn"
            >
              Celo Safe supports a wide range of wallets that you can choose to interact with your Safe.
            </p>
            <button
              class="sc-cxNHIi cZRdNE sc-daBunf fcunEo"
              color="primary"
            >
              <span
                class="sc-iqAclL csKvIw"
                color="primary"
              >
                <svg
                  height="16"
                  viewBox="0 0 16 16"
                  width="16"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <g
                    fill="none"
                    fill-rule="evenodd"
                  >
                    <path
                      d="M0 0H16V16H0z"
                    />
                    <path
                      class="icon-color"
                      d="M13 13v-2c0-.552.448-1 1-1s1 .448 1 1v2c0 1.105-.895 2-2 2H3c-1.105 0-2-.895-2-2V3c0-1.105.895-2 2-2h2c.552 0 1 .448 1 1s-.448 1-1 1H3v10h10z"
                      fill-rule="nonzero"
                    />
                    <path
                      class="icon-color"
                      d="M11.586 3H9c-.552 0-1-.448-1-1s.448-1 1-1h5c.276 0 .526.112.707.293.181.18.293.43.293.707v5c0 .552-.448 1-1 1s-1-.448-1-1V4.414l-6.243 6.243c-.39.39-1.023.39-1.414 0-.39-.39-.39-1.024 0-1.414L11.586 3z"
                    />
                  </g>
                </svg>
              </span>
              <p
                class="sc-crzoAE ezYmxP sc-lmgQwP iRbvqn"
                color="primary"
              >
                <a
                  class="sc-giAqHp hafODe"
                  href="https://help.gnosis-safe.io/en/articles/4689442-why-do-i-need-to-connect-a-wallet"
                  rel="noopener noreferrer"
                  target="_blank"
                  title="More info about: Why do I need to connect a wallet?"
                >
                  Why do I need to connect a wallet?
                </a>
              </p>
            </button>
            <button
              class="MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm iVtOgQ sc-bTDOke iZtCvR"
              data-testid="connect-btn"
              tabindex="0"
              type="button"
            >
              <span
                class="MuiButton-label"
              >
                <p
                  class="sc-crzoAE cDTggs"
                  color="white"
                >
                  Connect wallet
                </p>
              </span>
              <span
                class="MuiTouchRipple-root"
              />
            </button>
          </div>
          <div
            class="sc-bdnxRM dLzDRg sc-jOFryr eROAGc"
          >
            <div
              class="sc-gtsrHT hVABEH"
            />
            <div
              class="sc-eKYRIR jxwfCG"
            >
              <div
                class="sc-kHWWYL kxeAat"
              >
                <div
                  class="sc-gKAaRy hHycnu"
                  color="primary"
                >
                  <h5
                    class="sc-kfYoZR ilVsuP"
                  >
                    2
                  </h5>
                </div>
                <h4
                  class="sc-dlMDgC fmHXHh sc-hOPeYd kcKrfD"
                >
                  Create Safe
                </h4>
              </div>
              <p
                class="sc-crzoAE UIyUn"
              >
                Create a new Safe that is controlled by one or multiple owners. 
                <br />
                You will be required to pay a network fee for creating your new Safe.
              </p>
              <a
                aria-disabled="false"
                class="link regular MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm iVtOgQ sc-bTDOke iZtCvR"
                href="#/open"
                role="button"
                tabindex="0"
              >
                <span
                  class="MuiButton-label"
                >
                  <p
                    class="sc-crzoAE cDTggs"
                    color="white"
                  >
                    + Create new Safe
                  </p>
                </span>
                <span
                  class="MuiTouchRipple-root"
                />
              </a>
            </div>
            <div
              class="sc-jSFjdj dRqwzs"
            />
            <div
              class="sc-eKYRIR jxwfCG"
            >
              <h4
                class="sc-dlMDgC fmHXHh sc-dsXzNU dosRAy"
              >
                Add existing Safe
              </h4>
              <p
                class="sc-crzoAE UIyUn"
              >
                Already have a Safe? Do you want to access your Safe from a different device? Easily add it using your Safe address.
              </p>
              <a
                aria-disabled="false"
                class="link regular MuiButtonBase-root MuiButton-root MuiButton-text sc-iwajpm SioJh sc-bTDOke iZtCvR"
                href="#/load"
                role="button"
                tabindex="0"
              >
                <span
                  class="MuiButton-label"
                >
                  <span
                    class="sc-iqAclL hWlKVA sc-bCwfaz cWDlJU"
                  >
                    <svg
                      height="16"
                      viewBox="0 0 16 16"
                      width="16"
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <g
                        fill="none"
                        fill-rule="evenodd"
                      >
                        <path
                          d="M0 0H16V16H0z"
                        />
                        <path
                          d="M13 3c1.054 0 1.918.816 1.994 1.85l.005.15v6c0 1.054-.815 1.918-1.85 1.994l-.148.007c0 .512-.386.935-.884.993l-.117.007c-.552 0-1-.448-1-1H5c0 .512-.386.935-.883.993L4 14.001c-.553 0-1-.448-1-1-1.054-.001-1.919-.817-1.995-1.852L1 11V5c0-1.053.816-1.917 1.85-1.994L3 3h10zm0 2H3v6h10V5z"
                          fill="#B2B5B2"
                        />
                        <path
                          d="M10.49 6.5c-.827 0-1.5.672-1.5 1.5s.673 1.5 1.5 1.5c.83 0 1.5-.672 1.5-1.5s-.67-1.5-1.5-1.5"
                          fill="#B2B5B2"
                        />
                      </g>
                    </svg>
                  </span>
                  <p
                    class="sc-crzoAE UIyUn"
                    color="secondary"
                  >
                    Add existing Safe
                  </p>
                </span>
                <span
                  class="MuiTouchRipple-root"
                />
              </a>
            </div>
          </div>
        </div>
      </div>
    </main>
  </div>
</body>
    at Object.getElementError (/home/runner/work/safe-react/safe-react/node_modules/@testing-library/dom/dist/config.js:37:19)
    at /home/runner/work/safe-react/safe-react/node_modules/@testing-library/dom/dist/query-helpers.js:90:38
    at /home/runner/work/safe-react/safe-react/node_modules/@testing-library/dom/dist/query-helpers.js:62:17
    at getByText (/home/runner/work/safe-react/safe-react/node_modules/@testing-library/dom/dist/query-helpers.js:111:19)
    at Object.<anonymous> (/home/runner/work/safe-react/safe-react/src/routes/welcome/Welcome.test.tsx:9:19)
    at Promise.then.completed (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _runTest (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:57:9)
    at run (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/testWorker.js:133:12)

Check failure on line 13 in src/logic/safe/api/__tests__/fetchTokenCurrenciesBalances.test.ts

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

fetchTokenCurrenciesBalances > Given a safe address, calls the API and returns token balances

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: "http://localhost:8001/v1", "44787", "0xdfA693da0D16F5E7E78FdCBeDe8FC6eBEa44f1Cf", "USD", {"exclude_spam": true, "trusted": false}

Number of calls: 0
    at Object.<anonymous> (/home/runner/work/safe-react/safe-react/src/logic/safe/api/__tests__/fetchTokenCurrenciesBalances.test.ts:20:25)
    at Promise.then.completed (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _runTest (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:57:9)
    at run (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/home/runner/work/safe-react/safe-react/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/home/runner/work/safe-react/safe-react/node_modules/jest-runner/build/testWorker.js:133:12)