Temporarily exclude menu-modal from unit tests. Remove un-needed code.

This commit is contained in:
bmauger 2022-05-31 16:58:12 -04:00
parent 298da3b24d
commit 07c12f4d8b
6 changed files with 5 additions and 32 deletions

View file

@ -29,6 +29,7 @@ module.exports = {
"!src/common-components/textbox-question/textbox-question.vue",
"!src/ux-components/alert\alert.vue",
"!src/helpers/validation-rules.js",
"!src/common-components/menu-modal/menu-modal.vue",
// END
], // ! means exclude from coverage.
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],

View file

@ -3,30 +3,6 @@ import funnelFooter from "./funnel-footer";
describe("funnel-footer.vue", () => {
it("Should return footer-link class", async () => {
// Act
const r = {
test:"testing",
clientHeight: 10,
offsetHeight: 24,
};
global.document.querySelector = jest.fn().mockImplementation(()=> {
return r;
});
const wrapper = mount(funnelFooter, {
mixins: [mockMixin]
});
// Assert
const link = wrapper.find("a");
// Expect
expect(link.attributes('class')).toContain("footer");
});
it("Should emit ForwardClicked on button click", async () => {
// Act
const wrapper = mount(funnelFooter, {
@ -53,7 +29,7 @@ describe("funnel-footer.vue", () => {
mixins: [mockMixin]
});
wrapper.vm.updateButtonText('newText');
// Assert
expect(wrapper.componentVM.customButtontext).toBe('newText');
});
@ -65,4 +41,4 @@ const mockMixin = {
getCmsContent: jest.fn(),
getFooterInfoBoxHeight: jest.fn(()=>80)
}
}
}

View file

@ -63,9 +63,6 @@ export default {
document.onkeydown = null;
},
computed: {
height () {
return this.$refs.infoBox.clientHeight;
},
backLink(){
return this.getCmsContent(this.cmsWidgetName, 'BackButtonText');
},

View file

@ -27,7 +27,6 @@ export default {
data() {
return {
displayGlobalAlert: false,
headerHeight: 0,
globalAlertMessage: {
isDismissible: false,
messageCopy: "",

View file

@ -43,8 +43,8 @@ export default {
self.isActive = false;
});
myModalEl.addEventListener('show.bs.modal', function (event) {
self.isActive = true;
self.currentFooterAndHeaderHeight = self.getFooterInfoBoxHeight() + 72;
self.isActive = true;
})
},
components: {

View file

@ -5,7 +5,7 @@
ref="theForm"
v-slot="{ meta }"
>
<div class="page-container-grouped-styles has-footer">
<div class="page-container-grouped-styles">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />