CSR-944 fix tests
This commit is contained in:
parent
dc8b602e41
commit
df614d05a6
1 changed files with 37 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import { getPageToRouteExistingOrderTo, navigateToHeritageFunnel } from "@/helpe
|
||||||
import * as orderHelper from "@/helpers/heritage-integration/order-helper";
|
import * as orderHelper from "@/helpers/heritage-integration/order-helper";
|
||||||
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
|
import { storeMutations } from "@/constants/store-mutations";
|
||||||
import { setupMocksForJsFiles, getMockOrderInfo } from "@/helpers/unit-test-helper.js";
|
import { setupMocksForJsFiles, getMockOrderInfo } from "@/helpers/unit-test-helper.js";
|
||||||
import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
|
|
@ -22,6 +23,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: false
|
[fmgPageValues.VEHICLE_MAKE]: false
|
||||||
|
|
@ -40,6 +44,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -59,6 +66,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -79,6 +89,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -100,6 +113,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -122,6 +138,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -149,6 +168,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -176,6 +198,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -203,6 +228,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -230,6 +258,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -257,6 +288,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
query: {}
|
query: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||||
|
|
@ -286,6 +320,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||||
|
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const result = await getPageToRouteExistingOrderTo(toRoute, true);
|
const result = await getPageToRouteExistingOrderTo(toRoute, true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue