Heritage Buttons Removed resetButtonStyle method calls as this method was removed before our recent button work
This commit is contained in:
parent
45e31efca5
commit
c7bff1c758
7 changed files with 2 additions and 39 deletions
|
|
@ -81,7 +81,6 @@ describe('modal.vue', () => {
|
|||
validate: mockValidate(true)
|
||||
});
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -89,7 +88,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Act
|
||||
const buttonMain = wrapper.findComponent({ ref: 'modalButtonMain' });
|
||||
|
|
@ -112,8 +110,6 @@ describe('modal.vue', () => {
|
|||
meta: mockMeta(fakeMeta),
|
||||
validate: mockValidate(false)
|
||||
});
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -121,7 +117,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Act
|
||||
const buttonMain = wrapper.findComponent({ ref: 'modalButtonMain' });
|
||||
|
|
@ -144,8 +139,6 @@ describe('modal.vue', () => {
|
|||
meta: mockMeta(fakeMeta),
|
||||
validate: mockValidate(true)
|
||||
});
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -153,7 +146,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.isFooterButtonDisabled).toBe(true);
|
||||
|
|
@ -172,8 +164,6 @@ describe('modal.vue', () => {
|
|||
meta: mockMeta(fakeMeta),
|
||||
validate: mockValidate(true)
|
||||
});
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -181,7 +171,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.isFooterButtonDisabled).toBe(true);
|
||||
|
|
@ -202,8 +191,6 @@ describe('modal.vue', () => {
|
|||
});
|
||||
|
||||
const showMock = jest.spyOn(Modal.prototype, 'show');
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -211,7 +198,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Act
|
||||
wrapper.vm.openModal();
|
||||
|
|
@ -234,8 +220,6 @@ describe('modal.vue', () => {
|
|||
validate: mockValidate(true)
|
||||
});
|
||||
const hideMock = jest.spyOn(Modal.prototype, 'hide');
|
||||
|
||||
const resetButtonStyle = jest.fn();
|
||||
const wrapper = shallowMount(modal, {
|
||||
props: {
|
||||
footerButtonText,
|
||||
|
|
@ -243,7 +227,6 @@ describe('modal.vue', () => {
|
|||
},
|
||||
attachTo: document.body
|
||||
});
|
||||
wrapper.vm.resetButtonStyle = resetButtonStyle;
|
||||
|
||||
// Act
|
||||
wrapper.vm.openModal();
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ export default {
|
|||
const validationResult = await this.validate();
|
||||
if (validationResult.valid) {
|
||||
this.$emit('footer-button-event');
|
||||
} else {
|
||||
this.resetButtonStyle();
|
||||
}
|
||||
},
|
||||
async onKeyDown(e) {
|
||||
|
|
@ -125,14 +123,10 @@ export default {
|
|||
this.$refs.modalButtonMain.clicked();
|
||||
document.getElementById(this.modalId)?.focus();
|
||||
},
|
||||
resetButtonStyle() {
|
||||
this.$refs.modalButtonMain?.resetButtonStyle();
|
||||
},
|
||||
onModalOpened() {
|
||||
this.onModalOpenedCallback?.();
|
||||
},
|
||||
onModalClosed() {
|
||||
this.resetButtonStyle();
|
||||
this.onModalClosedCallback?.();
|
||||
},
|
||||
openModal() {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
class="modal fade modal-component"
|
||||
tabindex="-1"
|
||||
aria-labelledby="ModalComponentLabel"
|
||||
aria-hidden="true"
|
||||
v-on="{ 'hidden.bs.modal': resetButtonStyle }">
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
|
@ -69,9 +68,6 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
resetButtonStyle() {
|
||||
this.$refs.buttonMain.resetButtonStyle();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ export default {
|
|||
this.$refs[this.ModalName]?.closeModal();
|
||||
this.$emit('buttonClick');
|
||||
} else {
|
||||
this.$refs[this.ModalName]?.resetButtonStyle();
|
||||
this.showError = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,9 +260,6 @@ export default {
|
|||
this.displayInvalidZipAlert = false;
|
||||
this.internalModel = deepClone(this.modelValue);
|
||||
},
|
||||
resetModalButtonStyle() {
|
||||
this.modal.resetButtonStyle();
|
||||
},
|
||||
async setMobileLocation() {
|
||||
if (
|
||||
this.internalModel.addressQuestions.zipCode
|
||||
|
|
@ -273,7 +270,6 @@ export default {
|
|||
|
||||
if (!zipCodeData.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
this.resetModalButtonStyle();
|
||||
} else {
|
||||
// retrieve mobile fee part
|
||||
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ jest.mock('@/digital-components/textbox-question/textbox-question', () => ({
|
|||
|
||||
jest.mock('@/digital-components/modal/modal', () => ({
|
||||
methods: {
|
||||
closeModal: jest.fn(),
|
||||
resetButtonStyle: jest.fn()
|
||||
closeModal: jest.fn()
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -127,9 +127,6 @@ export default {
|
|||
closeModal() {
|
||||
this.$refs[this.modalName].closeModal();
|
||||
},
|
||||
resetModalButtonStyle() {
|
||||
this.$refs[this.modalName].resetButtonStyle();
|
||||
},
|
||||
onInputIdAssigned(inputId) {
|
||||
this.serviceZipCodeTextInputId = inputId;
|
||||
},
|
||||
|
|
@ -150,7 +147,6 @@ export default {
|
|||
if (!zipCodeData.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
this.focusOnZipInput();
|
||||
this.resetModalButtonStyle();
|
||||
} else {
|
||||
this.internalModel.state = zipCodeData.state;
|
||||
const serviceZipCode = this.internalModel.zipCode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue