diff --git a/src/helpers/boolean-helper.spec.js b/src/helpers/boolean-helper.spec.js index 37045d132..189bd2a78 100644 --- a/src/helpers/boolean-helper.spec.js +++ b/src/helpers/boolean-helper.spec.js @@ -2,7 +2,7 @@ import { getBoolFromString } from "./boolean-helper"; describe("getBoolFromString", () => { describe("Happy paths", () => { - test("\"true\" -> true", () => { + test('"true" -> true', () => { const input = "true"; const output = getBoolFromString(input); @@ -10,7 +10,7 @@ describe("getBoolFromString", () => { expect(output).toBe(true); }); - test("\"false\" -> false", () => { + test('"false" -> false', () => { const input = "false"; const output = getBoolFromString(input); @@ -18,7 +18,7 @@ describe("getBoolFromString", () => { expect(output).toBe(false); }); - test("\"other string\" -> false", () => { + test('"other string" -> false', () => { const input = "some random value"; const output = getBoolFromString(input); @@ -28,7 +28,7 @@ describe("getBoolFromString", () => { }); describe("Capitalization", () => { - test("\"TRUE\" -> true", () => { + test('"TRUE" -> true', () => { const input = "TRUE"; const output = getBoolFromString(input); @@ -36,7 +36,7 @@ describe("getBoolFromString", () => { expect(output).toBe(true); }); - test("\"True\" -> true", () => { + test('"True" -> true', () => { const input = "True"; const output = getBoolFromString(input); @@ -44,7 +44,7 @@ describe("getBoolFromString", () => { expect(output).toBe(true); }); - test("\"FALSE\" -> false", () => { + test('"FALSE" -> false', () => { const input = "FALSE"; const output = getBoolFromString(input); @@ -52,7 +52,7 @@ describe("getBoolFromString", () => { expect(output).toBe(false); }); - test("\"False\" -> false", () => { + test('"False" -> false', () => { const input = "False"; const output = getBoolFromString(input); @@ -70,7 +70,7 @@ describe("getBoolFromString", () => { expect(output).toBe(true); }); - + test("false -> false", () => { const input = false; @@ -140,7 +140,7 @@ describe("getBoolFromString", () => { const output = getBoolFromString(input); expect(output).toBe(false); - }) + }); }); }); -}); \ No newline at end of file +}); diff --git a/src/helpers/querystring-helper.js b/src/helpers/querystring-helper.js index 8c40c91b7..e6c488b1d 100644 --- a/src/helpers/querystring-helper.js +++ b/src/helpers/querystring-helper.js @@ -10,10 +10,10 @@ export function getQuerystringParameter(key) { } // if you add the fmgPage to the querystringobject before calling, then pass true for skipFmgPageName -export function buildQuerystringObject(qso, skipFmgPageName=false) { +export function buildQuerystringObject(qso, skipFmgPageName = false) { const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); - + for (const [name, value] of urlParams) { if (name.toLowerCase() === "fmgpage" && skipFmgPageName) { continue; @@ -21,4 +21,4 @@ export function buildQuerystringObject(qso, skipFmgPageName=false) { qso[name] = value; } return qso; -} \ No newline at end of file +} diff --git a/src/router/index.js b/src/router/index.js index f1bca935d..a0be7d09e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -176,9 +176,8 @@ const routes = [ // clear part related state because heritage selected a new vehicle if ( to.query.fmgPage === fmgPageValues.VEHICLE && - getBoolFromString( - getFunnelCookie()?.HasDelayedClaimRegistration && !fromReturnUser - ) + getBoolFromString(getFunnelCookie()?.HasDelayedClaimRegistration) && + !fromReturnUser ) { store.commit(storeMutations.RESET_GLASS_PARTS_STATE); }