Commit cea5ae87 authored by Mike Conley's avatar Mike Conley
Browse files

Bug 1830901 - Only check the campaign attribution code when checking...

Bug 1830901 - Only check the campaign attribution code when checking isDeviceMigration for ASRouter targeting. r=Mardak

Differential Revision: https://phabricator.services.mozilla.com/D176937
parent 3ea45680
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -967,17 +967,14 @@ const TargetingGetters = {
  },

  /**
   * Whether the user installed via the device migration flow from SUMO.
   * @return {boolean} `true` when SUMO provided the link to download as part
   * Whether the user installed via the device migration flow.
   * @return {boolean} `true` when the link to download the browser was part
   * of guidance for device migration. `false` otherwise.
   */
  get isDeviceMigration() {
    const { attributionData } = this;

    return (
      attributionData?.source === "support.mozilla.org" &&
      attributionData?.campaign === "migration"
    );
    return attributionData?.campaign === "migration";
  },
};

+2 −2
Original line number Diff line number Diff line
@@ -1658,12 +1658,12 @@ add_task(async function check_isDeviceMigration() {
      expected: false,
    },
    {
      title: "invalid source",
      title: "other source",
      attributionData: {
        source: "www.mozilla.org",
        campaign: "migration",
      },
      expected: false,
      expected: true,
    },
    {
      title: "valid attribution data for isDeviceMigration",