Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tests for PR#3533 #3568

Closed

Conversation

sentry-autofix[bot]
Copy link

This PR adds tests for #3533

Commits:

  • Add unit tests for new download functionality in UploadsCard component

@codecov-staging
Copy link

codecov-staging bot commented Dec 11, 2024

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
4823 4 4819 0
View the top 3 failed tests by shortest run time
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > handles download errors gracefully
Stack Traces | 0.0155s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input57"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input57"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1099:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > renders the Download button
Stack Traces | 0.019s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input55"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input55"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1064:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > does not attempt to download when there are no uploads
Stack Traces | 0.0195s run time
TypeError: Cannot read properties of undefined (reading 'map')
 ❯ UploadsCard .../CommitCoverage/UploadsCard/UploadsCard.tsx:228:15renderWithHooks .../react-dom/cjs/react-dom.development.js:15486:18mountIndeterminateComponent .../react-dom/cjs/react-dom.development.js:20103:13beginWork .../react-dom/cjs/react-dom.development.js:21626:16beginWork$1 .../react-dom/cjs/react-dom.development.js:27465:14performUnitOfWork .../react-dom/cjs/react-dom.development.js:26599:12workLoopSync .../react-dom/cjs/react-dom.development.js:26505:5renderRootSync .../react-dom/cjs/react-dom.development.js:26473:7recoverFromConcurrentError .../react-dom/cjs/react-dom.development.js:25889:20performSyncWorkOnRoot .../react-dom/cjs/react-dom.development.js:26135:20

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Dec 11, 2024

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
4183 4 4179 0
View the top 3 failed tests by shortest run time
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > handles download errors gracefully
Stack Traces | 0.0155s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input57"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input57"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1099:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > renders the Download button
Stack Traces | 0.019s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input55"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input55"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1064:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > does not attempt to download when there are no uploads
Stack Traces | 0.0195s run time
TypeError: Cannot read properties of undefined (reading 'map')
 ❯ UploadsCard .../CommitCoverage/UploadsCard/UploadsCard.tsx:228:15renderWithHooks .../react-dom/cjs/react-dom.development.js:15486:18mountIndeterminateComponent .../react-dom/cjs/react-dom.development.js:20103:13beginWork .../react-dom/cjs/react-dom.development.js:21626:16beginWork$1 .../react-dom/cjs/react-dom.development.js:27465:14performUnitOfWork .../react-dom/cjs/react-dom.development.js:26599:12workLoopSync .../react-dom/cjs/react-dom.development.js:26505:5renderRootSync .../react-dom/cjs/react-dom.development.js:26473:7recoverFromConcurrentError .../react-dom/cjs/react-dom.development.js:25889:20performSyncWorkOnRoot .../react-dom/cjs/react-dom.development.js:26135:20

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
4183 4 4179 0
View the top 3 failed tests by shortest run time
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > handles download errors gracefully
Stack Traces | 0.0155s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input57"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input57"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1099:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > renders the Download button
Stack Traces | 0.019s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input55"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input55"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1064:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > does not attempt to download when there are no uploads
Stack Traces | 0.0195s run time
TypeError: Cannot read properties of undefined (reading 'map')
 ❯ UploadsCard .../CommitCoverage/UploadsCard/UploadsCard.tsx:228:15renderWithHooks .../react-dom/cjs/react-dom.development.js:15486:18mountIndeterminateComponent .../react-dom/cjs/react-dom.development.js:20103:13beginWork .../react-dom/cjs/react-dom.development.js:21626:16beginWork$1 .../react-dom/cjs/react-dom.development.js:27465:14performUnitOfWork .../react-dom/cjs/react-dom.development.js:26599:12workLoopSync .../react-dom/cjs/react-dom.development.js:26505:5renderRootSync .../react-dom/cjs/react-dom.development.js:26473:7recoverFromConcurrentError .../react-dom/cjs/react-dom.development.js:25889:20performSyncWorkOnRoot .../react-dom/cjs/react-dom.development.js:26135:20

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Dec 11, 2024

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
4823 4 4819 0
View the top 3 failed tests by shortest run time
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > handles download errors gracefully
Stack Traces | 0.0155s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input57"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input57"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1099:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > renders the Download button
Stack Traces | 0.019s run time
TestingLibraryElementError: Found multiple elements with the text: Download

Here are the matching elements:

Ignored nodes: comments, script, style
<button
  class="text-ds-blue-default hover:underline"
>
  Download
</button>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis1"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

Ignored nodes: comments, script, style
<a
  class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
  data-cy="download report"
  data-marketing="download report"
  data-testid="download report"
  download=""
  href="/download/travis2"
  target="blank"
>
  Download
  <span
    class="text-ds-gray-quinary"
  >
    <svg
      class="w-4 h-4"
      data-icon=""
      data-testid=""
      fill="none"
      stroke="currentColor"
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="2"
      />
    </svg>
  </span>
</a>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
<body
  class=""
>
  <div>
    <div
      class="border border-ds-gray-secondary bg-ds-container overflow-x-hidden"
    >
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex justify-between"
        >
          <h3
            class="font-semibold text-base"
          >
            Coverage reports history
          </h3>
          <a
            class="
  font-sans cursor-pointer

  hover:underline

  focus:ring-2
 text-ds-blue-default inline-flex items-center gap-1"
            data-cy="open yaml modal"
            data-marketing="open yaml modal"
            data-testid="open yaml modal"
          >
            <span
              class="text-xs"
            >
              view YAML file
            </span>
          </a>
        </div>
        <p
          class="text-ds-gray-quinary"
        >
          uploads overview
        </p>
      </div>
      <div
        class="border-b border-ds-gray-secondary p-4"
      >
        <div
          class="flex flex-col"
        >
          <div
            class="flex items-start justify-between"
          >
            <div
              class="flex flex-col"
            />
          </div>
          <div>
            <label
              class="mb-2 block font-semibold sr-only"
              for="text-input55"
            >
              Search by upload or flag name
            </label>
            <div
              class="relative"
            >
              <div
                class="absolute left-2 flex h-full items-center text-ds-gray-quaternary"
              >
                <svg
                  class="w-4 h-4"
                  data-icon="search"
                  data-testid="search"
                  fill="none"
                  stroke="currentColor"
                  viewBox="0 0 24 24"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                  />
                </svg>
              </div>
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border pl-7"
                data-marketing="uploads-list-searchx"
                id="text-input55"
                placeholder="Search by upload or flag name"
                type="text"
                value=""
              />
            </div>
          </div>
        </div>
      </div>
      <div
        class="flex max-h-64 min-w-96 flex-1 flex-col divide-y divide-solid divide-ds-gray-secondary overflow-auto bg-ds-gray-primary dark:bg-ds-blue-default/5"
      >
        <span
          class="sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold"
        >
          <div
            class="flex items-center justify-between"
          >
            <div
              class="flex items-center"
            >
              <button
                aria-checked="true"
                class="peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-ds-gray-quinary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ds-blue-light focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-25 data-[state=checked]:border-ds-blue-default data-[state=checked]:bg-ds-blue-default data-[state=checked]:disabled:border-ds-gray-quinary data-[state=checked]:disabled:bg-ds-gray-quinary"
                data-state="checked"
                role="checkbox"
                type="button"
                value="on"
              >
                <span
                  class="flex size-3 items-center justify-center"
                  data-state="checked"
                  style="pointer-events: none;"
                >
                  <svg
                    class="[&_path]:stroke-white [&_path]:stroke-[4px] w-4 h-4"
                    data-icon="check"
                    data-testid="check"
                    fill="none"
                    stroke="currentColor"
                    viewBox="0 0 24 24"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M5 13l4 4L19 7"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                    />
                  </svg>
                </span>
              </button>
              <span
                class="ml-2"
              >
                travis
              </span>
            </div>
            <button
              class="text-ds-blue-default hover:underline"
            >
              Download[...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19getElementError node_modules/@.../dom/dist/query-helpers.js:20:35getMultipleElementsFoundError node_modules/@.../dom/dist/query-helpers.js:23:10node_modules/@.../dom/dist/query-helpers.js:55:13node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:1064:37
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard > Download functionality > does not attempt to download when there are no uploads
Stack Traces | 0.0195s run time
TypeError: Cannot read properties of undefined (reading 'map')
 ❯ UploadsCard .../CommitCoverage/UploadsCard/UploadsCard.tsx:228:15renderWithHooks .../react-dom/cjs/react-dom.development.js:15486:18mountIndeterminateComponent .../react-dom/cjs/react-dom.development.js:20103:13beginWork .../react-dom/cjs/react-dom.development.js:21626:16beginWork$1 .../react-dom/cjs/react-dom.development.js:27465:14performUnitOfWork .../react-dom/cjs/react-dom.development.js:26599:12workLoopSync .../react-dom/cjs/react-dom.development.js:26505:5renderRootSync .../react-dom/cjs/react-dom.development.js:26473:7recoverFromConcurrentError .../react-dom/cjs/react-dom.development.js:25889:20performSyncWorkOnRoot .../react-dom/cjs/react-dom.development.js:26135:20

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants