safe-global / safe-wallet-web

Safe{Wallet} – smart contract wallet for Ethereum (ex-Gnosis Safe multisig)
https://app.safe.global
GNU General Public License v3.0
312 stars 362 forks source link

Tests: Fix cypress tests #3816

Closed mike10ca closed 3 weeks ago

mike10ca commented 3 weeks ago

What it solves

Resolves #

How this PR fixes it

How to test it

github-actions[bot] commented 3 weeks ago

Branch preview

βœ… Deploy successful!

Website: https://fix_cypress_tests_dev--walletweb.review.5afe.dev/home?safe=eth:0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6

Storybook: https://fix_cypress_tests_dev--walletweb.review.5afe.dev/storybook/

github-actions[bot] commented 3 weeks ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action

github-actions[bot] commented 3 weeks ago

πŸ“¦ Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. πŸ€–

This PR introduced no changes to the JavaScript bundle! πŸ™Œ

github-actions[bot] commented 3 weeks ago

Coverage report

[!CAUTION] Test run failed

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
79.27% (-0.19% πŸ”»)
11375/14349
πŸ”΄ Branches
58.27% (-0.28% πŸ”»)
2738/4699
🟑 Functions
66.39% (-0.28% πŸ”»)
1817/2737
🟒 Lines
80.65% (-0.15% πŸ”»)
10260/12722
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | πŸ”΄ |
`...` / addedSafesSlice.ts
|
52.63% (-10.53% πŸ”»)
| 50% |
25% (-16.67% πŸ”»)
|
54.84% (-12.9% πŸ”»)
| | 🟒 |
`...` / index.tsx
|
82.35% (-8.82% πŸ”»)
|
66.67% (-16.67% πŸ”»)
|
50% (-12.5% πŸ”»)
|
83.87% (-9.68% πŸ”»)
| | 🟒 |
`...` / index.ts
|
93.1% (+1.18% πŸ”Ό)
|
82.09% (-2.06% πŸ”»)
|
95% (-0.45% πŸ”»)
|
94.19% (+1.33% πŸ”Ό)
| | 🟒 |
`...` / index.tsx
|
95.83% (-0.17% πŸ”»)
|
90.91% (-1.95% πŸ”»)
| 100% | 100% | | 🟑 |
`...` / index.tsx
| 68.75% |
41.38% (-3.78% πŸ”»)
| 42.86% | 67.39% | | 🟒 |
`...` / swaps.ts
|
75% (-25% πŸ”»)
| 100% | 100% | 100% | | 🟒 |
`...` / useSafeWalletProvider.tsx
|
81.82% (-0.42% πŸ”»)
|
63.16% (+3.16% πŸ”Ό)
|
69.23% (-1.14% πŸ”»)
|
83.87% (-0.29% πŸ”»)
| | πŸ”΄ |
`...` / utils.ts
|
41.46% (-9.76% πŸ”»)
|
27.27% (-9.09% πŸ”»)
|
14.29% (-14.29% πŸ”»)
|
44.83% (-6.9% πŸ”»)
| | 🟒 |
`...` / constants.ts
|
50% (-28.57% πŸ”»)
| 100% | 100% | 100% |

Test suite run failed

Failed tests: 0/1421. Failed suites: 2/199.
``` ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: β€’ If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. β€’ If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript β€’ To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. β€’ If you need a custom transformation specify a "transform" option in your config. β€’ If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/safe-wallet-web/safe-wallet-web/node_modules/@walletconnect/utils/node_modules/uint8arrays/esm/src/index.js:1 ({"Object.":function(module,exports,require,__dirname,__filename,jest){import { compare } from './compare.js'; ^^^^^^ SyntaxError: Cannot use import statement outside a module at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object. (node_modules/@walletconnect/utils/dist/index.cjs.js:1:525) at Object. (src/features/walletconnect/services/WalletConnectWallet.ts:2158:26) at Object. (src/features/walletconnect/services/__tests__/WalletConnectWallet.test.ts:38:69) ``` --- ``` ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: β€’ If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. β€’ If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript β€’ To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. β€’ If you need a custom transformation specify a "transform" option in your config. β€’ If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/safe-wallet-web/safe-wallet-web/node_modules/@walletconnect/utils/node_modules/uint8arrays/esm/src/index.js:1 ({"Object.":function(module,exports,require,__dirname,__filename,jest){import { compare } from './compare.js'; ^^^^^^ SyntaxError: Cannot use import statement outside a module at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object. (node_modules/@walletconnect/utils/dist/index.cjs.js:1:525) at Object. (node_modules/@walletconnect/core/dist/index.cjs.js:1:428) at Object. (src/features/walletconnect/services/WalletConnectWallet.ts:2152:26) at Object. (src/features/walletconnect/__tests__/WalletConnectContext.test.tsx:13:69) ```

Report generated by πŸ§ͺjest coverage report action from 263dc8f429e213fc3129fe300ac47661a79d2663

github-actions[bot] commented 3 weeks ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action