diff --git a/src/common-components/base-input-button/base-input-button.spec.js b/src/common-components/base-input-button/base-input-button.spec.js
index 1cb244997..3f1b03d9c 100644
--- a/src/common-components/base-input-button/base-input-button.spec.js
+++ b/src/common-components/base-input-button/base-input-button.spec.js
@@ -1,5 +1,6 @@
import { shallowMount, mount } from "@vue/test-utils";
import baseInputButton from "./base-input-button";
+import inputButtonWrapperMixin from "@/mixins/input-button-wrapper-mixin"
describe("baseInputButton.vue", () => {
describe("general", () => {
@@ -713,7 +714,7 @@ describe("baseInputButton.vue", () => {
});
describe("pushClickEventToGA", () => {
- test.only("pushEventToGA is called correctly", () => {
+ test("pushEventToGA is called correctly", () => {
// Arrange
const { wrapper } = setupMocks({
mockData: {
@@ -721,17 +722,11 @@ describe("baseInputButton.vue", () => {
value: "Bello",
setLastValuePushedToGa: jest.fn(),
},
- route: {
- query: {
- fmgPage: "myPage",
- },
- },
},
});
- console.log(wrapper.vm.$route)
+ console.log(wrapper.vm.$route);
- wrapper.vm.pushEventToGA = jest.fn();
wrapper.setData({
GaActions: {
CLICKED: "Clicked",
@@ -950,6 +945,25 @@ describe("baseInputButton.vue", () => {
});
});
});
+
+ describe("integration testing", () => {
+ describe("checkbox", () => {
+ test.only("click on both => both are selected", async () => {
+ // Arrange
+ const { wrapper } = setupBaseInputButtonWrapper({
+ isMultiSelect: true
+ })
+ console.log(wrapper.html())
+
+ // Act
+ const buttonWrappers = wrapper.findAllComponents({name: "baseInputButtonWrapper"})
+ await buttonWrappers[0].trigger("click")
+
+ // Assert
+ expect(wrapper.vm.value).toEqual(["value1"])
+ })
+ })
+ });
});
// TODO KO look at how I tested groups of these in SFA
@@ -957,15 +971,6 @@ describe("baseInputButton.vue", () => {
// that this acts like a regular input aside from a different emitted event)
function setupMocks({ mockData = {}, shouldShallowMount = true }) {
- const baseInputButtonWrapper = {
- components: { baseInputButton },
- template: '