-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore(4144): enable feature flag and fix unit tests falling this enable. #16150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(4144): enable feature flag and fix unit tests falling this enable. #16150
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
app/components/Views/confirmations/legacy/SendFlow/Confirm/__snapshots__/index.test.tsx.snap
Show resolved
Hide resolved
|
From today's daily sync: it's agreed that we will skip the SonarCloud requirement as part of our readiness to be cherry-picked into v7.49.0 RC cut. @EtherWizard33 @OGPoyraz @adonesky1 @NidhiKJha @hesterbruikman @sleepytanya Heads-up @sethkfman @Cal-L @cortisiko @Unik0rnMaggie @jvbriones. Pls let us know if you disagree with this decision. |
…cted-network is enabled these tests are not needed
|
|
|
8a6da4c
to
5efb0b0
Compare
e2e/specs/multichain/permissions/chains/permission-system-dapp-chain-switch-grant.spec.js
Show resolved
Hide resolved
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables the per dapp selected network feature flag and updates several unit tests to fix failing snapshots and behavior.
- Updated test flows to align with the new network flag behavior.
- Removed or updated redundant assertions (e.g., assertions for “Sent ETH”) from confirmation tests.
- Updated network-related helper functions and controller mocks to enforce the new flag behavior.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
e2e/specs/multichain/permissions/chains/permission-system-dapp-chain-switch-grant.spec.js | Updated test navigation flow and assertion for network selection. |
e2e/specs/multichain/permissions/chains/permission-system-add-non-permitted.spec.js | Disabled a test suite (using xdescribe) for non-permitted chains. |
e2e/specs/confirmations-redesigned/transactions/wallet-initiated-transfer.spec.ts | Removed outdated assertion checking for text "Sent ETH". |
e2e/specs/confirmations-redesigned/transactions/send-max-transfer.spec.ts | Similar update to the wallet initiated transfer tests. |
e2e/specs/confirmations-redesigned/transactions/per-dapp-selected-network.spec.js | Added a new test verifying the per dapp selected network behavior. |
e2e/specs/confirmations-redesigned/transactions/dapp-initiated-transfer.spec.ts | Removed outdated assertion checking for text "Sent ETH". |
e2e/selectors/Browser/TestDapp.selectors.js | Added a new selector for chain ID text. |
app/util/networks/index.js | Enabled the per dapp selected network flag by returning true. |
app/components/hooks/useAddressBalance/useAddressBalance.ts | Adjusted account selection to default to an empty object if undefined. |
app/components/Views/confirmations/legacy/SendFlow/Confirm/snapshots/index.test.tsx.snap | Updated snapshot text to reflect network name changes. |
app/components/Views/AccountPermissions/AccountPermissions.test.tsx | Updated expectations to reflect the new SelectedNetworkController API. |
Comments suppressed due to low confidence (1)
e2e/specs/multichain/permissions/chains/permission-system-add-non-permitted.spec.js:19
- The test has been disabled using xdescribe without an accompanying comment. Consider adding an explanation for its temporary disablement to aid future maintainability.
xdescribe(
e2e/specs/multichain/permissions/chains/permission-system-dapp-chain-switch-grant.spec.js
Show resolved
Hide resolved
e2e/specs/multichain/permissions/chains/permission-system-add-non-permitted.spec.js
Show resolved
Hide resolved
Skipped smoke test as it was coming from main |
@@ -633,8 +633,7 @@ export const isChainPermissionsFeatureEnabled = true; | |||
export const isPermissionsSettingsV1Enabled = | |||
process.env.MM_PERMISSIONS_SETTINGS_V1_ENABLED === 'true'; | |||
|
|||
export const isPerDappSelectedNetworkEnabled = () => | |||
process.env.MM_PER_DAPP_SELECTED_NETWORK === 'true'; | |||
export const isPerDappSelectedNetworkEnabled = () => true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we should get rid of this altogether? And get rid of the env variable in bitrise.yml?
Description
This enables the per dapp selected network feature flag. And updates the related unit tests.
These files have failing tests need to be fix
on main:
modified: app/components/UI/PermissionsSummary/PermissionsSummary.test.tsx (snaps updated by Eric)
modified: app/components/UI/TransactionElement/TransactionDetails/index.test.tsx (snaps updated by Eric)
modified: app/components/Views/AccountPermissions/AccountPermissions.test.tsx (fixed by Eric)
modified: app/components/Views/confirmations/components/confirm/confirm-component.test.tsx (fixed by Goktug)
modified: app/components/Views/confirmations/components/info-root/info-root.test.tsx (fixed by Goktug)
modified: app/components/Views/confirmations/components/info/switch-account-type/switch-account-type.test.tsx (fixed by Goktug)
modified: app/components/Views/confirmations/legacy/SendFlow/Confirm/index.test.tsx (fixed by Goktug)
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist