Related to T2375. Moved Tx collapse styled components from Tx.js to StyledCollapse.js so the SCs can be reused elsewhere in the app.
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC6cd909633aec: [Cashtab] Move collapse styled components from Tx.js to StyledCollapse.js
cd web/cashtab && npm start
observe that the Tx collapse still works
in StyledCollapse.js - observe that the Tx collapse styled components are now exported from StyledCollapse.js.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- move-collapse-styled-components
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 18712 Build 37215: Build Diff cashtab-tests Build 37214: arc lint + arc unit
Event Timeline
Failed tests logs:
====== CashTab Unit Tests: Wallet without BCH balance ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet without BCH balance 1` - Snapshot - 4 + Received + 4 @@ -1,26 +1,26 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <br />, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" at Object.<anonymous> (/work/web/cashtab/src/components/Airdrop/__tests__/Airdrop.test.js:46:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet without BCH balance 1` - Snapshot - 11 + Received + 11 @@ -1,25 +1,25 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" @@ -38,14 +38,14 @@ "width": "auto", } } > <div - className="sc-iRbamj jTdbqp" + className="sc-bRBYWo jxUyJK" > <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Send to </label> <div className="sc-VigVT jjiWJK" @@ -163,11 +163,11 @@ </div> </div> </div> </div> <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Amount </label> <div className="sc-VigVT jjiWJK" @@ -346,21 +346,21 @@ </div> </div> </div> </div> <div - className="sc-gPEVay iyFUUj" + className="sc-Rmtcm cJIGDJ" > <h3 - className="sc-jlyJG gdOWPz" + className="sc-hzDkRC kwCkjz" > 0 XEC </h3> <div - className="sc-cvbbAY cLZxXS" + className="sc-jDwBTQ hIpfRh" > = $ NaN USD </div> @@ -371,11 +371,11 @@ "paddingTop": "12px", } } > <button - className="sc-kGXeez cXnCgq" + className="sc-eNQAEJ dxfkVE" > Send </button> </div> <div> at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:46:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Wallet with BCH balances ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances 1` - Snapshot - 4 + Received + 4 @@ -1,26 +1,26 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <br />, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" at Object.<anonymous> (/work/web/cashtab/src/components/Airdrop/__tests__/Airdrop.test.js:61:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances 1` - Snapshot - 11 + Received + 11 @@ -1,25 +1,25 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" @@ -38,14 +38,14 @@ "width": "auto", } } > <div - className="sc-iRbamj jTdbqp" + className="sc-bRBYWo jxUyJK" > <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Send to </label> <div className="sc-VigVT jjiWJK" @@ -163,11 +163,11 @@ </div> </div> </div> </div> <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Amount </label> <div className="sc-VigVT jjiWJK" @@ -346,21 +346,21 @@ </div> </div> </div> </div> <div - className="sc-gPEVay iyFUUj" + className="sc-Rmtcm cJIGDJ" > <h3 - className="sc-jlyJG gdOWPz" + className="sc-hzDkRC kwCkjz" > 0 XEC </h3> <div - className="sc-cvbbAY cLZxXS" + className="sc-jDwBTQ hIpfRh" > = $ NaN USD </div> @@ -371,11 +371,11 @@ "paddingTop": "12px", } } > <button - className="sc-kGXeez cXnCgq" + className="sc-eNQAEJ dxfkVE" > Send </button> </div> <div> at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:61:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Wallet with BCH balances and tokens ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances and tokens 1` - Snapshot - 4 + Received + 4 @@ -1,26 +1,26 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <br />, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" at Object.<anonymous> (/work/web/cashtab/src/components/Airdrop/__tests__/Airdrop.test.js:76:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances and tokens 1` - Snapshot - 11 + Received + 11 @@ -1,25 +1,25 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" @@ -38,14 +38,14 @@ "width": "auto", } } > <div - className="sc-iRbamj jTdbqp" + className="sc-bRBYWo jxUyJK" > <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Send to </label> <div className="sc-VigVT jjiWJK" @@ -163,11 +163,11 @@ </div> </div> </div> </div> <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Amount </label> <div className="sc-VigVT jjiWJK" @@ -346,21 +346,21 @@ </div> </div> </div> </div> <div - className="sc-gPEVay iyFUUj" + className="sc-Rmtcm cJIGDJ" > <h3 - className="sc-jlyJG gdOWPz" + className="sc-hzDkRC kwCkjz" > 0 XEC </h3> <div - className="sc-cvbbAY cLZxXS" + className="sc-jDwBTQ hIpfRh" > = $ NaN USD </div> @@ -371,11 +371,11 @@ "paddingTop": "12px", } } > <button - className="sc-kGXeez cXnCgq" + className="sc-eNQAEJ dxfkVE" > Send </button> </div> <div> at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:76:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Wallet with BCH balances and tokens and state field ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances and tokens and state field 1` - Snapshot - 4 + Received + 4 @@ -1,25 +1,25 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-kkGfuU fwBSar" + className="sc-jWBwVP gdMlXD" > 0.06 XEC </div> </div>, <br />, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" at Object.<anonymous> (/work/web/cashtab/src/components/Airdrop/__tests__/Airdrop.test.js:93:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot() Snapshot name: `Wallet with BCH balances and tokens and state field 1` - Snapshot - 11 + Received + 11 @@ -1,24 +1,24 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <h4 - className="sc-cMljjf hTVzrw" + className="sc-jlyJG fgeSBQ" > MigrationTestAlpha </h4> <div - className="sc-kkGfuU fwBSar" + className="sc-jWBwVP gdMlXD" > 0.06 XEC </div> </div>, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" @@ -37,14 +37,14 @@ "width": "auto", } } > <div - className="sc-iRbamj jTdbqp" + className="sc-bRBYWo jxUyJK" > <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Send to </label> <div className="sc-VigVT jjiWJK" @@ -162,11 +162,11 @@ </div> </div> </div> </div> <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Amount </label> <div className="sc-VigVT jjiWJK" @@ -345,21 +345,21 @@ </div> </div> </div> </div> <div - className="sc-gPEVay iyFUUj" + className="sc-Rmtcm cJIGDJ" > <h3 - className="sc-jlyJG gdOWPz" + className="sc-hzDkRC kwCkjz" > 0 XEC </h3> <div - className="sc-cvbbAY cLZxXS" + className="sc-jDwBTQ hIpfRh" > = $ NaN USD </div> @@ -370,11 +370,11 @@ "paddingTop": "12px", } } > <button - className="sc-kgoBCf dKKqLy" + className="sc-jKJlTe jWeghZ" onClick={[Function]} > Send </button> </div> at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:93:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Without wallet defined ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Without wallet defined 1` - Snapshot - 3 + Received + 3 @@ -1,21 +1,21 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <br />, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" at Object.<anonymous> (/work/web/cashtab/src/components/Airdrop/__tests__/Airdrop.test.js:113:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot() Snapshot name: `Without wallet defined 1` - Snapshot - 10 + Received + 10 @@ -1,20 +1,20 @@ Array [ <div - className="sc-hMqMXs kpJXFt" + className="sc-eHgmQL esgeHR" > <div - className="sc-iAyFgw hxUtff" + className="sc-brqgnP jHOLle" > You currently have 0 XEC <br /> Deposit some funds to use this feature </div> </div>, <div - className="sc-jKJlTe iSWneW" + className="sc-iAyFgw eRQdeW" > <div className="ant-row" style={Object {}} type="flex" @@ -33,14 +33,14 @@ "width": "auto", } } > <div - className="sc-iRbamj jTdbqp" + className="sc-bRBYWo jxUyJK" > <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Send to </label> <div className="sc-VigVT jjiWJK" @@ -158,11 +158,11 @@ </div> </div> </div> </div> <label - className="sc-eNQAEJ kESMRD" + className="sc-hSdWYo bWWjLk" > Amount </label> <div className="sc-VigVT jjiWJK" @@ -341,21 +341,21 @@ </div> </div> </div> </div> <div - className="sc-gPEVay iyFUUj" + className="sc-Rmtcm cJIGDJ" > <h3 - className="sc-jlyJG gdOWPz" + className="sc-hzDkRC kwCkjz" > 0 XEC </h3> <div - className="sc-cvbbAY cLZxXS" + className="sc-jDwBTQ hIpfRh" > = $ NaN USD </div> @@ -366,11 +366,11 @@ "paddingTop": "12px", } } > <button - className="sc-kGXeez cXnCgq" + className="sc-eNQAEJ dxfkVE" > Send </button> </div> <div> at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:113:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Configure without a wallet ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Configure without a wallet 1` - Snapshot - 11 + Received + 11 @@ -1,10 +1,10 @@ <div className="sc-gqjmRU dYraLr" > <div - className="sc-jlyJG duZduB" + className="sc-hzDkRC Ibvtg" > <h2> <span aria-label="copy" className="anticon anticon-copy sc-bdVaJa jyutTw" @@ -67,11 +67,11 @@ Your seed phrase is the only way to restore your wallet. Write it down. Keep it safe. </div> </div> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="wallet" className="anticon anticon-wallet sc-htpNat lgbLiL" @@ -92,11 +92,11 @@ </svg> </span> Manage Wallets </h2> <button - className="sc-eHgmQL bqOmSo" + className="sc-jAaTju dvdlmc" onClick={[Function]} > <span aria-label="plus-square" className="anticon anticon-plus-square" @@ -120,11 +120,11 @@ </svg> </span> New Wallet </button> <button - className="sc-cvbbAY dvozVe" + className="sc-jDwBTQ jbpJDn" onClick={[Function]} > <span aria-label="import" className="anticon anticon-import" @@ -145,11 +145,11 @@ </svg> </span> Import Wallet </button> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="dollar" className="anticon anticon-dollar sc-bwzfXH gJwWNq" @@ -170,11 +170,11 @@ </svg> </span> Fiat Currency </h2> <div - className="sc-kkGfuU kpUqYa" + className="sc-jWBwVP einKSv" > <div className="ant-select select-after ant-select-single ant-select-show-arrow" onBlur={[Function]} onFocus={[Function]} @@ -262,11 +262,11 @@ </span> </span> </div> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="setting" className="anticon anticon-setting sc-ifAKCX gjwsUR" @@ -287,11 +287,11 @@ </svg> </span> General Settings </h2> <div - className="sc-csuQGl bKEXij" + className="sc-fBuWsC hmHqDR" > <div className="title" > <span @@ -346,11 +346,11 @@ Not Supported </span> </span> </div> <div - className="sc-csuQGl bKEXij" + className="sc-fBuWsC hmHqDR" > <div className="SendConfirm" > <span @@ -409,15 +409,15 @@ </span> </span> </button> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> [ <a - className="sc-brqgnP dPRIWg" + className="sc-iRbamj bDTUpB" href="https://docs.cashtab.com/docs/" rel="noreferrer" target="_blank" type="link" > at Object.<anonymous> (/work/web/cashtab/src/components/Configure/__tests__/Configure.test.js:17:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12) ====== CashTab Unit Tests: Configure with a wallet ====== Error: expect(received).toMatchSnapshot() Snapshot name: `Configure with a wallet 1` - Snapshot - 11 + Received + 11 @@ -1,10 +1,10 @@ <div className="sc-gqjmRU dYraLr" > <div - className="sc-jlyJG duZduB" + className="sc-hzDkRC Ibvtg" > <h2> <span aria-label="copy" className="anticon anticon-copy sc-bdVaJa jyutTw" @@ -107,11 +107,11 @@ Click to reveal seed phrase </div> </div> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="wallet" className="anticon anticon-wallet sc-htpNat lgbLiL" @@ -132,11 +132,11 @@ </svg> </span> Manage Wallets </h2> <button - className="sc-eHgmQL bqOmSo" + className="sc-jAaTju dvdlmc" onClick={[Function]} > <span aria-label="plus-square" className="anticon anticon-plus-square" @@ -160,11 +160,11 @@ </svg> </span> New Wallet </button> <button - className="sc-cvbbAY dvozVe" + className="sc-jDwBTQ jbpJDn" onClick={[Function]} > <span aria-label="import" className="anticon anticon-import" @@ -185,11 +185,11 @@ </svg> </span> Import Wallet </button> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="dollar" className="anticon anticon-dollar sc-bwzfXH gJwWNq" @@ -210,11 +210,11 @@ </svg> </span> Fiat Currency </h2> <div - className="sc-kkGfuU kpUqYa" + className="sc-jWBwVP einKSv" > <div className="ant-select select-after ant-select-single ant-select-show-arrow" onBlur={[Function]} onFocus={[Function]} @@ -302,11 +302,11 @@ </span> </span> </div> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> <h2> <span aria-label="setting" className="anticon anticon-setting sc-ifAKCX gjwsUR" @@ -327,11 +327,11 @@ </svg> </span> General Settings </h2> <div - className="sc-csuQGl bKEXij" + className="sc-fBuWsC hmHqDR" > <div className="title" > <span @@ -386,11 +386,11 @@ Not Supported </span> </span> </div> <div - className="sc-csuQGl bKEXij" + className="sc-fBuWsC hmHqDR" > <div className="SendConfirm" > <span @@ -449,15 +449,15 @@ </span> </span> </button> </div> <div - className="sc-gipzik oErko" + className="sc-jhAzac lnZvle" /> [ <a - className="sc-brqgnP dPRIWg" + className="sc-iRbamj bDTUpB" href="https://docs.cashtab.com/docs/" rel="noreferrer" target="_blank" type="link" > at Object.<anonymous> (/work/web/cashtab/src/components/Configure/__tests__/Configure.test.js:31:18) at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10) at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40) at processTicksAndRejections (node:internal/process/task_queues:94:5) at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3) at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9) at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3) at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21) at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19) at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16) at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34) at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
Each failure log is accessible here:
CashTab Unit Tests: Wallet without BCH balance
CashTab Unit Tests: Wallet with BCH balances
CashTab Unit Tests: Wallet with BCH balances and tokens
CashTab Unit Tests: Wallet with BCH balances and tokens and state field
CashTab Unit Tests: Without wallet defined
CashTab Unit Tests: Configure without a wallet
CashTab Unit Tests: Configure with a wallet
Hm. The original intent here was to create a component that could be dropped into Tx.js, but Tx.js has now become so complicated that it is the appropriate place where the component is defined.
Also, since the component is so specialized, I do not think we want it to be portable anywhere else.
So -- let's go the other way on this. Take AntdContextCollapseWrapper out of StyledCollapse.js --- since it is used nowhere else --- and instead define it in Tx.js with the rest of the styled components that are only used in Tx.js
web/cashtab/src/components/Home/Tx.js | ||
---|---|---|
258 ↗ | (On Diff #33059) | These elements are unique to Tx.js so do not need to be exported; drop the export from this and the below elements |