Skip to content

init tests for SpatialViewer

Sign in for the full log view
GitHub Actions / jest-github-action failed Dec 4, 2024 in 0s

Jest tests failed

Failed tests: 4/1038. Failed suites: 4/222.

Details

  ● SpatialViewer › fetches sample file URLs and processes them

    expect(received).toHaveBeenCalled()

    Matcher error: received value must be a mock or spy function

    Received has value: undefined

      151 |
      152 |     expect(getSampleFileUrls).toHaveBeenCalledWith(expect.any(String), expect.any(String), 'ome_zarr_zip');
    > 153 |     expect(ZipFileStore.fromUr).toHaveBeenCalled(); // Ensure zarrRoot is called
          |                                 ^
      154 |     expect(zarrRoot).toHaveBeenCalled(); // Ensure zarrRoot is called
      155 |     expect(loadOmeZarrGrid).toHaveBeenCalled(); // Ensure loadOmeZarrGrid is called
      156 |     // Add assertions to verify that component processed the URLs correctly

      at Object.toHaveBeenCalled (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:153:33)

  ● SpatialViewer › renders popover on cell selection and closes on cancel

    TypeError: component.find(...).props(...).setCellSelection is not a function

      170 |     const selectedCellIds = new Set([1, 2]);
      171 |     act(() => {
    > 172 |       component.find('div.vitessce-container').props().setCellSelection(selectedCellIds);
          |                                                        ^
      173 |     });
      174 |     component.update();
      175 |

      at setCellSelection (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:172:56)
      at act (node_modules/react/cjs/react.development.js:2199:20)
      at Object.<anonymous> (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:171:8)

  ● SpatialViewer › highlights cells on hover

    TypeError: component.find(...).props(...).setCellHighlight is not a function

      189 |   it('highlights cells on hover', () => {
      190 |     act(() => {
    > 191 |       component.find('div.vitessce-container').props().setCellHighlight(1);
          |                                                        ^
      192 |     });
      193 |
      194 |     expect(store.getActions().length).toEqual(1);

      at setCellHighlight (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:191:56)
      at act (node_modules/react/cjs/react.development.js:2199:20)
      at Object.<anonymous> (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:190:8)

  ● SpatialViewer › creates a new cluster on popover create action

    TypeError: component.find(...).props(...).setCellSelection is not a function

      200 |     const selectedCellIds = new Set([1, 2]);
      201 |     act(() => {
    > 202 |       component.find('div.vitessce-container').props().setCellSelection(selectedCellIds);
          |                                                        ^
      203 |     });
      204 |     component.update();
      205 |

      at setCellSelection (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:202:56)
      at act (node_modules/react/cjs/react.development.js:2199:20)
      at Object.<anonymous> (src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:201:8)

Annotations

Check failure on line 147 in src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx

See this annotation in the file changed.

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

SpatialViewer > fetches sample file URLs and processes them

Error: expect(received).toHaveBeenCalled()

Matcher error: received value must be a mock or spy function

Received has value: undefined
    at Object.toHaveBeenCalled (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:153:33)

Check failure on line 167 in src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx

See this annotation in the file changed.

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

SpatialViewer > renders popover on cell selection and closes on cancel

TypeError: component.find(...).props(...).setCellSelection is not a function
    at setCellSelection (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:172:56)
    at act (/home/runner/work/ui/ui/node_modules/react/cjs/react.development.js:2199:20)
    at Object.<anonymous> (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:171:8)
    at Promise.then.completed (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/ui/ui/node_modules/jest-runner/build/testWorker.js:106:12)

Check failure on line 189 in src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx

See this annotation in the file changed.

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

SpatialViewer > highlights cells on hover

TypeError: component.find(...).props(...).setCellHighlight is not a function
    at setCellHighlight (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:191:56)
    at act (/home/runner/work/ui/ui/node_modules/react/cjs/react.development.js:2199:20)
    at Object.<anonymous> (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:190:8)
    at Promise.then.completed (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/ui/ui/node_modules/jest-runner/build/testWorker.js:106:12)

Check failure on line 199 in src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx

See this annotation in the file changed.

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

SpatialViewer > creates a new cluster on popover create action

TypeError: component.find(...).props(...).setCellSelection is not a function
    at setCellSelection (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:202:56)
    at act (/home/runner/work/ui/ui/node_modules/react/cjs/react.development.js:2199:20)
    at Object.<anonymous> (/home/runner/work/ui/ui/src/__test__/components/data-exploration/embedding/SpatialViewer.test.jsx:201:8)
    at Promise.then.completed (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui/ui/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/ui/ui/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/ui/ui/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/ui/ui/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/ui/ui/node_modules/jest-runner/build/testWorker.js:106:12)