From 34b4be252fed10e0a2269c2e5c69db2afd21db46 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 20 Jun 2024 17:01:55 -0500 Subject: [PATCH] fix tests --- app/scripts/controllers/app-state.js | 1 + .../errors-after-init-opt-in-background-state.json | 1 + .../state-snapshots/errors-after-init-opt-in-ui-state.json | 1 + ui/selectors/transactions.test.js | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/scripts/controllers/app-state.js b/app/scripts/controllers/app-state.js index 256dfba38438..e6c3dc6a0ed0 100644 --- a/app/scripts/controllers/app-state.js +++ b/app/scripts/controllers/app-state.js @@ -62,6 +62,7 @@ export default class AppStateController extends EventEmitter { ...initState, qrHardware: {}, nftsDropdownState: {}, + queuedRequestCount: 0, usedNetworks: { '0x1': true, '0x5': true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 266ac0dc29f4..02e094f00397 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -214,6 +214,7 @@ "selectedAddress": "string" }, "PushPlatformNotificationsController": { "fcmToken": "string" }, + "QueuedRequestController": "object", "SelectedNetworkController": { "domains": "object" }, "SignatureController": { "unapprovedMsgs": "object", diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index 8b5ead0902b3..0e3feeec4bd8 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -81,6 +81,7 @@ "nftsDropdownState": {}, "termsOfUseLastAgreed": "number", "qrHardware": {}, + "queuedRequestCount": "number", "usedNetworks": { "0x1": true, "0x5": true, "0x539": true }, "snapsInstallPrivacyWarningShown": true, "surveyLinkLastClickedOrClosed": "object", diff --git a/ui/selectors/transactions.test.js b/ui/selectors/transactions.test.js index 75fb713bcd48..4339cb8bdbed 100644 --- a/ui/selectors/transactions.test.js +++ b/ui/selectors/transactions.test.js @@ -767,10 +767,10 @@ describe('Transaction Selectors', () => { expect(result).toBe(true); }); - it('should return false if there is a pending transaction on different network', () => { + it('should return true if there is a pending transaction on different network', () => { mockedState.metamask.transactions[0].chainId = 'differentChainId'; const result = hasTransactionPendingApprovals(mockedState); - expect(result).toBe(false); + expect(result).toBe(true); }); it.each([