From 702ee233e7f244ffcbbde9858ec6a750c4c59167 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 21 Aug 2023 12:53:04 -0230 Subject: [PATCH] Remove snapshot update from release process (#20546) The Sentry e2e state snapshots now mask the application version and migration version, ensuring that the snapshots don't need a extra update in each release candidate branch and post-release sync branch. The values are masked rather than removed so that the test still shows they are present in error reports, where they can be quite useful for diagnostic purposes. --- test/e2e/tests/errors.spec.js | 8 ++++++++ .../errors-after-init-opt-in-background-state.json | 4 ++-- .../errors-after-init-opt-in-ui-state.json | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/test/e2e/tests/errors.spec.js b/test/e2e/tests/errors.spec.js index 5c557b256..7d7e12424 100644 --- a/test/e2e/tests/errors.spec.js +++ b/test/e2e/tests/errors.spec.js @@ -9,9 +9,17 @@ const FixtureBuilder = require('../fixture-builder'); const maskedBackgroundFields = [ 'CurrencyController.conversionDate', // This is a timestamp that changes each run + // App metadata is masked so that we don't have to update the snapshot as + // part of the release process + 'AppMetadataController.currentAppVersion', + 'AppMetadataController.currentMigrationVersion', ]; const maskedUiFields = [ 'metamask.conversionDate', // This is a timestamp that changes each run + // App metadata is masked so that we don't have to update the snapshot as + // part of the release process + 'metamask.currentAppVersion', + 'metamask.currentMigrationVersion', ]; const removedBackgroundFields = [ diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json index 37927c291..5a4012071 100644 --- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json @@ -8,10 +8,10 @@ }, "AnnouncementController": "object", "AppMetadataController": { - "currentAppVersion": "10.34.5", + "currentAppVersion": "string", "previousAppVersion": "", "previousMigrationVersion": 0, - "currentMigrationVersion": 94 + "currentMigrationVersion": "number" }, "AppStateController": { "connectedStatusPopoverHasBeenShown": true, diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json index 37a9dc691..7843dcd7f 100644 --- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -57,10 +57,10 @@ "usedNetworks": "object", "snapsInstallPrivacyWarningShown": "boolean", "serviceWorkerLastActiveTime": "number", - "currentAppVersion": "10.34.5", + "currentAppVersion": "string", "previousAppVersion": "", "previousMigrationVersion": 0, - "currentMigrationVersion": 94, + "currentMigrationVersion": "number", "selectedNetworkClientId": "string", "networkId": "1337", "providerConfig": {