diff --git a/src/common-components/modal/modal.spec.js b/src/common-components/modal/modal.spec.js
index 85472d6eb..2664accfa 100644
--- a/src/common-components/modal/modal.spec.js
+++ b/src/common-components/modal/modal.spec.js
@@ -6,6 +6,10 @@ describe("modal.vue", () => {
// Act
const wrapper = shallowMount(Modal, {
mixins: [mockMixin],
+ props: {
+ cmsWidgetName: "test",
+ },
+ attachTo: document.body,
});
expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["HeaderText"]));
});
@@ -14,6 +18,10 @@ describe("modal.vue", () => {
// Act
const wrapper = shallowMount(Modal, {
mixins: [mockMixin],
+ props: {
+ cmsWidgetName: "test",
+ },
+ attachTo: document.body,
});
expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["SubheaderText"]));
});
@@ -22,6 +30,10 @@ describe("modal.vue", () => {
// Act
const wrapper = shallowMount(Modal, {
mixins: [mockMixin],
+ props: {
+ cmsWidgetName: "test",
+ },
+ attachTo: document.body,
});
expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Image"]));
});
@@ -30,6 +42,10 @@ describe("modal.vue", () => {
// Act
const wrapper = shallowMount(Modal, {
mixins: [mockMixin],
+ props: {
+ cmsWidgetName: "test",
+ },
+ attachTo: document.body,
});
expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"]));
});
diff --git a/src/common-components/modal/modal.vue b/src/common-components/modal/modal.vue
index aa88fe9ea..d28e87bdd 100644
--- a/src/common-components/modal/modal.vue
+++ b/src/common-components/modal/modal.vue
@@ -25,7 +25,7 @@
@@ -60,6 +60,13 @@ export default {
return this.getCmsContent(this.cmsWidgetName, "FooterText");
},
},
+ mounted() {
+ console.log("#1", document);
+ const modal = document.querySelector("#" + this.cmsWidgetName);
+ modal.addEventListener("hidden.bs.modal", (event) => {
+ this.$refs.buttonMain.resetButtonStyle();
+ });
+ },
components: {
buttonMain,
},
diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue
index 47d608b5b..5c705f49d 100644
--- a/src/ux-components/button-main/button-main.vue
+++ b/src/ux-components/button-main/button-main.vue
@@ -1,7 +1,7 @@
@@ -28,6 +28,7 @@ export default {
loaderColor: String,
loaderPosition: String,
isFloat: Boolean,
+ suppressLoader: Boolean,
},
data() {
return {
@@ -50,6 +51,12 @@ export default {
this.$emit("click-event");
}
},
+ resetButtonStyle() {
+ this.isLoaderDisplayed = false;
+ },
+ },
+ mounted() {
+ this.isLoaderDisplayed = false;
},
components: {
loader,