From 180ac559b860be8c7333fefc320d17cbe8337990 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 a01f4d664..e8191f915 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.35.0", + "currentAppVersion": "string", "previousAppVersion": "", "previousMigrationVersion": 0, - "currentMigrationVersion": 92.1 + "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 ff188c72f..64a08f7b4 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 @@ "snapsInstallPrivacyWarningShown": "boolean", "hadAdvancedGasFeesSetPriorToMigration92_3": "boolean", "serviceWorkerLastActiveTime": "number", - "currentAppVersion": "10.35.0", + "currentAppVersion": "string", "previousAppVersion": "", "previousMigrationVersion": 0, - "currentMigrationVersion": 92.1, + "currentMigrationVersion": "number", "networkId": "1337", "networkStatus": "available", "providerConfig": {