Page MenuHomePhabricator

[Cashtab] Patch tx times in history for in-node chronik
ClosedPublic

Authored by bytesofman on Mar 21 2024, 14:25.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6afa8a2be4b5: [Cashtab] Patch tx times in history for in-node chronik
Summary

We now return timeFirstSeen as a number instead of a string, so the expected === is failing.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Mar 21 2024, 14:28

Failed tests logs:

====== CashTab Unit Tests: <Tx /> Renders the timestamp as block timestamp timeFirstSeen === 0 ======
Error: expect(element).toHaveTextContent()

Expected element to have text content:
  ReceivedJan 14, 2024 at 4:46:35 AM
Received:
  ReceivedJan 1, 1970 at 12:00:00 AM
    at Object.toHaveTextContent (/work/cashtab/src/components/Home/__tests__/Tx.test.js:85:28)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)

Each failure log is accessible here:
CashTab Unit Tests: <Tx /> Renders the timestamp as block timestamp timeFirstSeen === 0

Failed tests logs:

====== CashTab Unit Tests: <Tx /> Renders the timestamp as block timestamp timeFirstSeen === 0 ======
Error: expect(element).toHaveTextContent()

Expected element to have text content:
  ReceivedJan 14, 2024 at 4:46:35 AM
Received:
  ReceivedJan 1, 1970 at 12:00:00 AM
    at Object.toHaveTextContent (/work/cashtab/src/components/Home/__tests__/Tx.test.js:85:28)
    at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9)
    at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)

Each failure log is accessible here:
CashTab Unit Tests: <Tx /> Renders the timestamp as block timestamp timeFirstSeen === 0

patch test mocks, bump extension version