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
314 stars 372 forks source link

Tests: add tx filter tests #3777

Closed mike10ca closed 1 month ago

mike10ca commented 1 month ago

What it solves

How this PR fixes it

How to test it

github-actions[bot] commented 1 month ago

Branch preview

βœ… Deploy successful!

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

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

github-actions[bot] commented 1 month 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 1 month ago

Coverage report

[!CAUTION] Test run failed

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
79.05% (-0.44% πŸ”»)
11442/14474
πŸ”΄ Branches
57.97% (-0.51% πŸ”»)
2727/4704
🟑 Functions
65.79% (-0.91% πŸ”»)
1829/2780
🟒 Lines
80.49% (-0.39% πŸ”»)
10324/12827
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | πŸ”΄ |
`...` / SocialLoginModule.ts
| 15.94% | 0% | 5% | 15.79% | | 🟒 |
`...` / PasswordRecovery.tsx
| 91.3% | 100% | 50% | 95.24% | | 🟒 |
`...` / mpcWallet.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / PasswordInput.tsx
| 80% | 42.86% | 33.33% | 87.5% | | πŸ”΄ |
`...` / index.tsx
| 44.78% | 19.35% | 27.27% | 46.77% | | 🟑 |
`...` / useSocialWallet.ts
| 46.67% | 100% | 0% | 60% | | 🟑 |
`...` / index.tsx
| 57.89% | 0% | 0% | 64.71% | | 🟒 |
`...` / index.tsx
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / WalletDetails.tsx
| 87.5% | 100% | 0% | 85.71% |
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟑 |
`...` / wallets.ts
|
66.67% (-0.9% πŸ”»)
|
25% (-3.57% πŸ”»)
| 77.78% |
68.75% (-1.25% πŸ”»)
| | 🟒 |
`...` / index.tsx
|
82.35% (-8.82% πŸ”»)
|
66.67% (-16.67% πŸ”»)
|
50% (-12.5% πŸ”»)
|
83.87% (-9.68% πŸ”»)
| | 🟒 |
`...` / config.tsx
|
86.36% (-0.59% πŸ”»)
| 100% | 100% | 100% | | 🟑 |
`...` / index.tsx
|
78.3% (+1.77% πŸ”Ό)
|
51.16% (-1.96% πŸ”»)
| 72.73% |
79% (+1.83% πŸ”Ό)
| | πŸ”΄ |
`...` / index.tsx
|
51.43% (-1.35% πŸ”»)
| 0% | 0% |
56.25% (-1.33% πŸ”»)
| | 🟒 |
`...` / index.tsx
| 100% |
66.67% (-13.33% πŸ”»)
| 100% | 100% | | 🟒 |
`...` / index.tsx
|
86.84% (-2.05% πŸ”»)
|
66.67% (-19.05% πŸ”»)
|
60% (-15% πŸ”»)
|
91.18% (+3.68% πŸ”Ό)
| | 🟒 |
`...` / ConnectionCenter.tsx
|
85.19% (-14.81% πŸ”»)
|
66.67% (-33.33% πŸ”»)
|
40% (-60% πŸ”»)
|
91.67% (-8.33% πŸ”»)
|

Test suite run failed

Failed tests: 0/1450. Failed suites: 5/203.
``` ● Test suite failed to run Cannot find module '@web3auth/mpc-core-kit' from 'src/services/mpc/__tests__/SocialWalletService.test.ts' 4 | type UserInfo, 5 | type OauthLoginParams, > 6 | type Web3AuthMPCCoreKit, | ^ 7 | type TssSecurityQuestion, 8 | } from '@web3auth/mpc-core-kit' 9 | import * as mpcCoreKit from '@web3auth/mpc-core-kit' at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object. (src/services/mpc/__tests__/SocialWalletService.test.ts:6:61) ``` --- ``` ● Test suite failed to run Cannot find module '@web3auth/mpc-core-kit' from 'src/components/common/SocialSigner/index.tsx' Require stack: src/components/common/SocialSigner/index.tsx src/components/common/SocialSigner/__tests__/SocialSignerLogin.test.tsx at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object. (src/components/common/SocialSigner/index.tsx:1407:28) at Object. (src/components/common/SocialSigner/__tests__/SocialSignerLogin.test.tsx:8:23) ``` --- ``` ● Test suite failed to run Cannot find module '@web3auth/mpc-core-kit' from 'src/services/mpc/__mocks__/SocialWalletService.ts' 9 | * For password recovery it expects the password to be "Test1234!" 10 | */ > 11 | class TestSocialWalletService implements ISocialWalletService { | ^ 12 | private fakePassword = 'Test1234!' 13 | private postLoginState = COREKIT_STATUS.LOGGED_IN 14 | private _isMfaEnabled = false at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object. (src/services/mpc/__mocks__/SocialWalletService.ts:11:21) at Object. (src/components/common/WalletInfo/index.test.tsx:12:69) ``` --- ``` ● Test suite failed to run Cannot find module '@web3auth/mpc-core-kit' from 'src/hooks/wallets/mpc/__tests__/useMPC.test.ts' 9 | import { type EIP1193Provider, type OnboardAPI } from '@web3-onboard/core' 10 | > 11 | jest.mock('@web3auth/mpc-core-kit', () => ({ | ^ 12 | ...jest.requireActual('@web3auth/mpc-core-kit'), 13 | Web3AuthMPCCoreKit: jest.fn(), 14 | })) at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.mock (src/hooks/wallets/mpc/__tests__/useMPC.test.ts:11:6) ``` --- ``` ● Test suite failed to run Cannot find module '@web3auth/base' from 'src/hooks/wallets/mpc/useMPC.ts' Require stack: src/hooks/wallets/mpc/useMPC.ts src/services/mpc/__tests__/module.test.ts at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object. (src/hooks/wallets/mpc/useMPC.ts:2110:27) at Object. (src/services/mpc/__tests__/module.test.ts:9:57) ```

Report generated by πŸ§ͺjest coverage report action from 55d3a56da09fd80c1f250c01dcd97764bea1f261

github-actions[bot] commented 1 month ago

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

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

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/transactions 73.84 KB (🟑 +21 B) 1023.86 KB
/transactions/history 73.8 KB (🟑 +21 B) 1023.83 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.