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

UIIN-3187: ECS: Disable opening item details if a user is not affiliated with item's member tenant #2707

Merged
merged 4 commits into from
Jan 22, 2025

UIIN-3187: ECS: Disable opening item details if a user is not affilia…

4efff99
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

UIIN-3187: ECS: Disable opening item details if a user is not affiliated with item's member tenant #2707

UIIN-3187: ECS: Disable opening item details if a user is not affilia…
4efff99
Select commit
Loading
Failed to load commit list.
GitHub Actions / Jest Unit Test Results failed Jan 10, 2025 in 0s

7 fail, 2 skipped, 1 014 pass in 15m 2s

       1 files  ±0     255 suites  ±0   15m 2s ⏱️ +20s
1 023 tests ±0  1 014 ✔️  - 7  2 💤 ±0  7 +7 
1 030 runs  ±0  1 021 ✔️  - 7  2 💤 ±0  7 +7 

Results for commit 4efff99. ± Comparison against earlier commit 02cc133.

Annotations

Check warning on line 0 in InstancesList rendering InstancesList with instances segment when a user does not have Staff Suppress permissions and staffSuppress.true filter is present should replace history with selected facet value

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with instances segment when a user does not have Staff Suppress permissions and staffSupp…ve Staff Suppress permissions and staffSuppress.true filter is present should replace history with selected facet value) failed

artifacts/jest-junit/junit.xml
Raw output
TypeError: Cannot destructure property 'user' of '((cov_1wje8cm29g(...).s[394]++) , this.props)' as it is undefined.
    at InstancesList.stripes [as getCurrentTenantPermissions] (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.js:1203:7)
    at InstancesList.getCurrentTenantPermissions [as componentDidMount] (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.js:269:12)
    at commitLayoutEffectOnFiber (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:23349:28)
    at commitLayoutMountEffects_complete (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:24727:9)
    at commitLayoutEffects_begin (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:24713:7)
    at commitLayoutEffects (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:24651:3)
    at commitRootImpl (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:26862:5)
    at commitRoot (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:26721:5)
    at finishConcurrentRender (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:26020:9)
    at performConcurrentWorkOnRoot (/home/runner/work/ui-inventory/ui-inventory/node_modules/react-dom/cjs/react-dom.development.js:25848:7)
    at flushActQueue (/home/runner/work/ui-inventory/ui-inventory/node_modules/react/cjs/react.development.js:2667:24)
    at act (/home/runner/work/ui-inventory/ui-inventory/node_modules/react/cjs/react.development.js:2582:11)
    at /home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/dist/act-compat.js:47:25
    at renderRoot (/home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/dist/pure.js:180:26)
    at render (/home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/dist/pure.js:271:10)
    at renderInstancesList (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:193:46)
    at Object.renderInstancesList (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:224:11)
    at Promise.then.completed (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:121:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:121:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:121:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/ui-inventory/ui-inventory/node_modules/jest-runner/build/testWorker.js:106:12)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when open item view should enclose the barcode query in quotes

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when open item view should enclose the barcode query in quotes (InstancesList rendering InstancesList with Item segment when open item view should enclose the barcode query in quotes) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"headers": {"Content-Type": "application/json", "X-Okapi-Tenant": "college"}, "params": {"query": "barcode==\"1234567(89)\""}}

Number of calls: 0
    at Object.toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:954:36)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when open item view should enclose the isbn query in quotes

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when open item view should enclose the isbn query in quotes (InstancesList rendering InstancesList with Item segment when open item view should enclose the isbn query in quotes) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"headers": {"Content-Type": "application/json", "X-Okapi-Tenant": "college"}, "params": {"query": "isbn==\"1234567(89)\""}}

Number of calls: 0
    at Object.toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:954:36)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when open item view should enclose the issn query in quotes

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when open item view should enclose the issn query in quotes (InstancesList rendering InstancesList with Item segment when open item view should enclose the issn query in quotes) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"headers": {"Content-Type": "application/json", "X-Okapi-Tenant": "college"}, "params": {"query": "issn==\"1234567(89)\""}}

Number of calls: 0
    at Object.toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:954:36)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when open item view should enclose the hrid query in quotes

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when open item view should enclose the hrid query in quotes (InstancesList rendering InstancesList with Item segment when open item view should enclose the hrid query in quotes) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"headers": {"Content-Type": "application/json", "X-Okapi-Tenant": "college"}, "params": {"query": "hrid==\"1234567(89)\""}}

Number of calls: 0
    at Object.toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:954:36)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when open item view should enclose the id query in quotes

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when open item view should enclose the id query in quotes (InstancesList rendering InstancesList with Item segment when open item view should enclose the id query in quotes) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"headers": {"Content-Type": "application/json", "X-Okapi-Tenant": "college"}, "params": {"query": "id==\"1234567(89)\""}}

Number of calls: 0
    at Object.toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:954:36)

Check warning on line 0 in InstancesList rendering InstancesList with Item segment when there is one item found should navigate to item details page

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

InstancesList rendering InstancesList with Item segment when there is one item found should navigate to item details page (InstancesList rendering InstancesList with Item segment when there is one item found should navigate to item details page) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: ObjectContaining {"pathname": "/inventory/view/69640328-788e-43fc-9c3c-af39e243f3b7/holdingsRecordId/itemId", "state": {"tenantFrom": "diku", "tenantTo": "college"}}
Received
       1: "//view/69640328-788e-43fc-9c3c-af39e243f3b7?segment=items&sort=contributors&filters=staffSuppress.false"
       2: "/inventory/view/69640328-788e-43fc-9c3c-af39e243f3b7?filters=staffSuppress.false&segment=items&sort=contributors"
       3: "//view/69640328-788e-43fc-9c3c-af39e243f3b7?segment=items&sort=contributors&filters=staffSuppress.false"

Number of calls: 18

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div>
      <div
        id="ModuleContainer"
      >
        <button
          type="button"
        >
          new
        </button>
        <div>
          Inventory
        </div>
        <div
          class="inventoryInstances"
          data-test-inventory-instances="true"
        >
          <div
            class="paneset"
            data-test-search-and-sort="true"
            id="search-and-sort-paneset"
          >
            <div
              aria-live="assertive"
              aria-relevant="additions"
              class="sr-only"
            />
            <section
              class="pane focusIndicator"
              data-test-filter-pane="true"
              id="pane-filter"
              style="flex: 0 0 320px; left: 0px;"
            >
              <div
                aria-labelledby="paneHeaderpane-filter-pane-title"
                class="paneHeader"
                data-test-pane-header="true"
                id="paneHeaderpane-filter"
                role="region"
                tabindex="-1"
              >
                <div
                  class="paneHeaderCenter"
                >
                  <div
                    class="paneHeaderCenterInner"
                    id="paneHeaderpane-filter-pane-title"
                  >
                    <h2
                      class="paneTitle"
                      data-test-pane-header-title="true"
                    >
                      <span
                        class="paneTitleLabel"
                      >
                        Search & filter
                      </span>
                    </h2>
                  </div>
                </div>
                <div
                  class="paneHeaderButtonsArea last"
                >
                  <div
                    class="paneMenu"
                  >
                    <button
                      aria-label="caret-left"
                      aria-labelledby="collapse-filter-pane-button-tooltip-text"
                      class="iconButton medium button PaneHeaderIconButton paneHeaderIconButton"
                      data-test-collapse-filter-pane-button="true"
                      icon="caret-left"
                      type="button"
                    >
                      <span
                        class="iconButtonInner mediumOffset PaneHeaderIconButton__inner"
                        data-test-collapse-filter-pane-button="true"
                      >
                        <span />
                      </span>
                    </button>
                    <span
                      class="sr-only"
                      data-test-tooltip-proximity-element="true"
                    >
                      <span
                        id="collapse-filter-pane-button-tooltip-text"
                        role="tooltip"
                      >
                        Collapse Search & filter pane
                      </span>
                    </span>
                  </div>
                </div>
              </div>
              <div
                class="paneContent hasPadding"
                id="pane-filter-content"
                tabindex="-1"
              >
                <form>
                  <div
                    class="buttonGroup fullWidth"
                  >
                    <button
                      class="button default"
                      id="mode-navigation-search"
                      type="button"
                    >
                      <span
                        class="inner"
                      >
                        Search
                      </span>
                    </button>
                    <button
                      class="button default"
                      id="mode-navigation-browse"
                      type="button"
                    >
                      <span
                        class="inner"
                      >
                        Browse
                      </span>
                    </button>
                  </div>
                  <div
                    class="buttonGroup fullWidth"
                    data-test-filters-navigation="true"
                  >
                    <a
                      class="button default"
                      href="/inventory?segment=instances&sort=contributors"
                      id="segment-navigation-instances"
                      role="button"
                    >
                      Instance
                    </a>
                    <a
                      class="button default"
                      href="/inventory?segment=holdings&sort=contributors"
                      id="segment-navigation-holdings"
                      role="button"
                    >
                      Holdings
                    </a>
                    ...
    at toHaveBeenCalledWith (/home/runner/work/ui-inventory/ui-inventory/src/components/InstancesList/InstancesList.test.js:988:50)
    at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/config.js:47:12)
    at checkCallback (/home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:124:77)
    at /home/runner/work/ui-inventory/ui-inventory/node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:82:9