Skip to content

feat: Add Swap Settings SwapProvider #4440

feat: Add Swap Settings SwapProvider

feat: Add Swap Settings SwapProvider #4440

Triggered via pull request September 10, 2024 22:44
Status Failure
Total duration 3m 51s
Artifacts

test.yml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

3 errors
src/swap/components/SwapProvider.test.tsx > SwapProvider > should emit onStatus when setLifeCycleStatus is called with transactionPending: src/swap/components/SwapProvider.tsx#L74
TypeError: Cannot read properties of null (reading 'maxSlippage') ❯ src/swap/components/SwapProvider.tsx:74:36 ❯ src/swap/components/SwapProvider.tsx:126:25 ❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23189:26 ❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24970:11 ❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24930:9 ❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24917:7 ❯ commitPassiveMountEffects node_modules/react-dom/cjs/react-dom.development.js:24905:3 ❯ flushPassiveEffectsImpl node_modules/react-dom/cjs/react-dom.development.js:27078:3 ❯ flushPassiveEffects node_modules/react-dom/cjs/react-dom.development.js:27023:14 ❯ commitRootImpl node_modules/react-dom/cjs/react-dom.development.js:26974:5
src/swap/components/SwapProvider.test.tsx > SwapProvider > should reset status to init when setLifeCycleStatus is called with success: src/swap/components/SwapProvider.test.tsx#L426
AssertionError: expected "spy" to be called with arguments: [ { statusName: 'init', …(1) } ] Received: 1st spy call: Array [ Object { "statusData": Object { - "isMissingRequiredField": false, - "maxSlippage": Any<Number>, + "isMissingRequiredField": true, + "maxSlippage": 10, }, "statusName": "init", }, ] 2nd spy call: Array [ Object { "statusData": Object { - "isMissingRequiredField": false, - "maxSlippage": Any<Number>, + "receipt": Array [ + "0x123", + ], }, - "statusName": "init", + "statusName": "success", }, ] 3rd spy call: Array [ Object { "statusData": Object { "isMissingRequiredField": false, - "maxSlippage": Any<Number>, + "maxSlippage": undefined, }, "statusName": "init", }, ] Number of calls: 3 Ignored nodes: comments, script, style <html> <head /> <body> <div> <div data-testid="test-component" > <span data-testid="context-value-lifeCycleStatus-statusName" > init </span> <button type="button" > setLifeCycleStatus.error </button> <button type="button" > setLifeCycleStatus.amountChange </button> <button type="button" > setLifeCycleStatus.transactionPending </button> <button type="button" > setLifeCycleStatus.transactionApproved </button> <button type="button" > setLifeCycleStatus.success </button> <button type="submit" > Swap </button> </div> </div> </body> </html> ❯ __vi_import_2__.waitFor.timeout src/swap/components/SwapProvider.test.tsx:426:28 ❯ runWithExpensiveErrorDiagnosticsDisabled node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/config.js:47:12 ❯ checkCallback node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:124:77 ❯ Timeout.checkRealTimersCallback node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/wait-for.js:118:16
build (18.x)
Process completed with exit code 1.