CSr-628 Fix tests
This commit is contained in:
parent
d76814ca14
commit
2d397d8607
1 changed files with 11 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import store from "@/store";
|
|||
import { validate } from "vee-validate";
|
||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected.js";
|
||||
import { routerParams } from "@/router/router-constants/router-params";
|
||||
import * as cookieHelper from "@/helpers/heritage-integration/cookie-helper";
|
||||
|
||||
// Mock our module for promises.
|
||||
jest.mock("@/helpers/layout-helper.js", () => ({
|
||||
|
|
@ -29,6 +30,11 @@ jest.mock("@/helpers/cms-content-helper", () => ({
|
|||
fetchCmsContentForPage: jest.fn(),
|
||||
}));
|
||||
|
||||
// Mock getFunnelCookie
|
||||
jest.mock("@/helpers/heritage-integration/cookie-helper", () => ({
|
||||
getFunnelCookie: jest.fn(),
|
||||
}));
|
||||
|
||||
// Mock Store
|
||||
jest.mock("@/store", () => ({
|
||||
commit: jest.fn(),
|
||||
|
|
@ -653,6 +659,10 @@ describe("vehicle-damage.vue", () => {
|
|||
})
|
||||
});
|
||||
|
||||
describe("vehicle-damage.vue wasDelayedClaimRegistration", () => {
|
||||
test.todo("if wasDelayedClaimRegistration, should hide back button")
|
||||
});
|
||||
|
||||
// THE FOLLOWING TEST IS NOT NECESSARILY REQUIRED FOR COVERAGE
|
||||
// BUT KEEP FOR AN EXAMPLE OF A VALIDATION TEST
|
||||
//
|
||||
|
|
@ -741,6 +751,7 @@ function setupMocks({pageHeaderWidgetHeaderText, mountOptionsMockData}) {
|
|||
|
||||
settleAllPromises.mockImplementation(() => apiPromise);
|
||||
fetchCmsContentForPage.mockImplementation(() => Promise.resolve());
|
||||
cookieHelper.getFunnelCookie = jest.spyOn(cookieHelper, "getFunnelCookie").mockReturnValue({});
|
||||
|
||||
//Mock damage initialize methods
|
||||
damageLocationQuestion.methods = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue