diff --git a/src/ux-components/list-button-horizontal/list-button-horizontal.spec.js b/src/ux-components/list-button-horizontal/list-button-horizontal.spec.js index cbd757a88..5c288f660 100644 --- a/src/ux-components/list-button-horizontal/list-button-horizontal.spec.js +++ b/src/ux-components/list-button-horizontal/list-button-horizontal.spec.js @@ -1,6 +1,7 @@ import { shallowMount } from "@vue/test-utils"; import listButtonHorizontal from "./list-button-horizontal"; import { nextTick } from "vue"; +import { GaActions } from "@/constants/analytics"; describe("list-button-horizontal.vue", () => { it("Should return input type checkbox if isMultiSelect is true", async () => { @@ -90,6 +91,13 @@ describe("list-button-horizontal.vue", () => { it("Should return loader enabled true", async () => { // Act const wrapper = shallowMount(listButtonHorizontal, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { selectingInitiatesLoad: true, }, @@ -112,6 +120,13 @@ describe("list-button-horizontal.vue", () => { it("Should return loader color", async () => { // Act const wrapper = shallowMount(listButtonHorizontal, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { loaderColor: "blue", selectingInitiatesLoad: true, @@ -135,6 +150,13 @@ describe("list-button-horizontal.vue", () => { it("Should return loader position", async () => { // Act const wrapper = shallowMount(listButtonHorizontal, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { loaderPosition: "right", selectingInitiatesLoad: true, diff --git a/src/ux-components/list-button/list-button.spec.js b/src/ux-components/list-button/list-button.spec.js index 7a244a5bf..7cce84cd8 100644 --- a/src/ux-components/list-button/list-button.spec.js +++ b/src/ux-components/list-button/list-button.spec.js @@ -1,6 +1,7 @@ import { shallowMount } from "@vue/test-utils"; import listButton from "./list-button"; import { nextTick } from "vue"; +import { GaActions } from "@/constants/analytics"; describe("list-button.vue", () => { it("Should return input type checkbox if isMultiSelect is true", async () => { @@ -90,6 +91,13 @@ describe("list-button.vue", () => { it("Should return loader enabled true", async () => { // Act const wrapper = shallowMount(listButton, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { selectingInitiatesLoad: true, }, @@ -109,6 +117,13 @@ describe("list-button.vue", () => { it("Should return loader color", async () => { // Act const wrapper = shallowMount(listButton, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { loaderColor: "blue", selectingInitiatesLoad: true, @@ -128,6 +143,13 @@ describe("list-button.vue", () => { it("Should return loader position", async () => { // Act const wrapper = shallowMount(listButton, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { loaderPosition: "right", selectingInitiatesLoad: true, diff --git a/src/ux-components/list-card/list-card.spec.js b/src/ux-components/list-card/list-card.spec.js index d810909e8..2fbdaade4 100644 --- a/src/ux-components/list-card/list-card.spec.js +++ b/src/ux-components/list-card/list-card.spec.js @@ -1,6 +1,7 @@ import { shallowMount } from "@vue/test-utils"; import listCard from "./list-card"; import { nextTick } from "vue"; +import { GaActions } from "@/constants/analytics"; describe("list-card.vue", () => { it("Should return input type checkbox if isMultiSelect is true", async () => { @@ -292,8 +293,16 @@ describe("list-card.vue", () => { }); it("Should run handleChange if triggerButton is triggered", async () => { + // Act const wrapper = shallowMount(listCard, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { selectingInitiatesLoad: false, }, @@ -312,6 +321,13 @@ describe("list-card.vue", () => { it("Should run handleCheckChange and displayLoader if triggerButton is triggered and seletingInitiatesLoad is true", async () => { // Act const wrapper = shallowMount(listCard, { + global: { + mocks: { + '$route': { query: { fmgPage: 'page-name' } }, + GaActions: GaActions, + pushEventToGA: jest.fn(), + } + }, propsData: { selectingInitiatesLoad: true, },