Merge branch 'develop' into bugfix/CSR-584
This commit is contained in:
commit
1b9fb93398
13 changed files with 48 additions and 11 deletions
|
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
statements: 85,
|
||||
statements: 84,
|
||||
// Got the go ahead from Mark to temporarily lower this. Taking out initialize component made the year,make,model and style coverage drop a bit. Once unit tests for license plate lookup, vin lookup and address lookup are in the coverage should go back up to 90
|
||||
},
|
||||
},
|
||||
|
|
|
|||
BIN
src/assets/img/wiper-loader.gif
Normal file
BIN
src/assets/img/wiper-loader.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row form-test-error">
|
||||
<div class="row form-test-error mt-1">
|
||||
<error-message :name="groupName" v-if="!suppressError"></error-message>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -134,7 +134,7 @@ export default {
|
|||
return answer.Name ? answer.Name : answer;
|
||||
},
|
||||
handleCheckedChanged(val) {
|
||||
|
||||
|
||||
this.pushEventToGA(this.$route.query[queryStrings.FMG_PAGE], this.GaActions.CLICKED, val.value, true);
|
||||
|
||||
if(this.isMultiSelect && this.selectedValues) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ jest.mock(
|
|||
|
||||
jest.mock('@/assets/img/loader.gif', () => 'loader.gif')
|
||||
jest.mock('@/assets/img/windshield.png', () => 'windshield.png')
|
||||
jest.mock('@/assets/img/wiper-loader.gif', () => 'windshield.png')
|
||||
|
||||
describe("loadingModal", () => {
|
||||
test("showModal sets modal visible", async () => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -26,6 +26,7 @@ const GaLabels = {
|
|||
ERROR: 'Error',
|
||||
LICENSE_PLATE_LOOKUP: 'License_Plate_Look_Up',
|
||||
VIN_LOOKUP: 'Vin_Look_Up',
|
||||
ADDRESS_LOOKUP: 'Address_Look_up',
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,16 @@ export default {
|
|||
this.$route
|
||||
);
|
||||
},
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||
this.pushEventToGA(
|
||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||
this.GaActions.SUBMITTED,
|
||||
this.GaLabels.ADDRESS_LOOKUP,
|
||||
true
|
||||
);
|
||||
});
|
||||
},
|
||||
getRegistrationAddressFromStore() {
|
||||
return store.getters.vehicle.registration.address;
|
||||
},
|
||||
|
|
@ -356,6 +366,9 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.attachCustomEvents();
|
||||
},
|
||||
computed: {
|
||||
AlertNonServiceableZipHeader(){
|
||||
const zipCode = this.serviceZipCode ? this.serviceZipCode : this.customerQuestions.addressQuestions.zipCode;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import store from "@/store";
|
|||
|
||||
jest.mock('@/assets/img/loader.gif', () => 'loader.gif')
|
||||
jest.mock('@/assets/img/windshield.png', () => 'windshield.png')
|
||||
jest.mock('@/assets/img/wiper-loader.gif', () => 'windshield.png')
|
||||
|
||||
// Mock our module for promises.
|
||||
jest.mock("@/helpers/layout-helper.js", () => ({
|
||||
|
|
@ -86,7 +87,6 @@ describe("license-plate-lookup.vue", () => {
|
|||
|
||||
//Assert
|
||||
expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -199,12 +199,12 @@ export default {
|
|||
},
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||
this.pushEventToGA(
|
||||
this.pushEventToGA(
|
||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||
this.GaActions.SUBMITTED,
|
||||
this.GaLabels.LICENSE_PLATE_LOOKUP,
|
||||
true
|
||||
);
|
||||
);
|
||||
});
|
||||
},
|
||||
getLicensePlateFromStore() {
|
||||
|
|
|
|||
|
|
@ -183,6 +183,9 @@ export default {
|
|||
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.attachCustomEvents();
|
||||
},
|
||||
watch: {
|
||||
vin() {
|
||||
this.$refs.funnelFooter.updateButtonText(
|
||||
|
|
@ -255,12 +258,12 @@ export default {
|
|||
getZipFromStore(){
|
||||
return store.getters.order.serviceLocation.zipCode;
|
||||
},
|
||||
attachCustomEvents() {
|
||||
attachCustomEvents() {
|
||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||
this.pushEventToGA(
|
||||
this.$route.query[this.queryStrings.FMG_PAGE],
|
||||
this.GaActions.SUBMITTED,
|
||||
this.GaLabels.VINLOOKUP,
|
||||
this.GaLabels.VIN_LOOKUP,
|
||||
true
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -97,8 +97,9 @@ export default {
|
|||
},
|
||||
|
||||
prependActionToMethod(object, method, actionToPrepend) {
|
||||
const baseMethod = object[method.name];
|
||||
object[method.name] = function () {
|
||||
const baseMethodName = method.name.startsWith('bound ') ? method.name.substring(6) : method.name ;
|
||||
const baseMethod = object[baseMethodName];
|
||||
object[baseMethodName] = function () {
|
||||
actionToPrepend.apply(this, arguments);
|
||||
return baseMethod.apply(object, arguments);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -107,4 +107,17 @@ describe("analyticsMixin.js", () => {
|
|||
}]);
|
||||
|
||||
});
|
||||
|
||||
test("Obj is not null after action prepended", () => {
|
||||
//Arrange
|
||||
const obj = {baseMethodName:"testMethodName", data:"testData"};
|
||||
const method = {name:"testMethodName", data:"testData" }
|
||||
const action = "testAction";
|
||||
|
||||
//Act
|
||||
analyticsMixin.methods.prependActionToMethod(obj, method, action);
|
||||
|
||||
//Assert
|
||||
expect(obj!=null);
|
||||
});
|
||||
});
|
||||
|
|
@ -88,12 +88,14 @@ html {
|
|||
border: 1px solid $gray-500;
|
||||
input:not(:focus) {
|
||||
+ label {
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px $gray-500;
|
||||
border-radius: .5rem;
|
||||
}
|
||||
}
|
||||
input:checked:focus {
|
||||
+ label {
|
||||
border: none;
|
||||
box-shadow: 0 0 0 2.5px $blue;
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue