Merge branch 'develop' into feature/CSR-803-refactoring-2
This commit is contained in:
commit
36721ef7ee
10 changed files with 15 additions and 27 deletions
|
|
@ -48,29 +48,6 @@ describe("dropdownQuestion.vue", () => {
|
|||
expect(label.text()).toContain(questionText);
|
||||
});
|
||||
|
||||
it("Should render the 'questionText' data value with '⁠' after the first character of each word in the label text when disableAutoFill is true.", async () => {
|
||||
// Arrange
|
||||
const wrapper = shallowMount(dropdownQuestion, {
|
||||
propsData: {
|
||||
options: {},
|
||||
disableAutoFill: true,
|
||||
},
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
|
||||
// Mock CMS content ...
|
||||
// Trust me, the below instance of the string "Question Text" actually has the ⁠ in it. You just can't see it
|
||||
// Don't believe me? Copy and paste it into Google. Then inspect the search field element in Dev Tools,
|
||||
// you will see "Q⁠uestion T⁠ext"
|
||||
const expectedQuestionText = "Question Text";
|
||||
|
||||
// Act
|
||||
const label = wrapper.find("label");
|
||||
|
||||
// Assert
|
||||
expect(label.text()).toContain(expectedQuestionText);
|
||||
});
|
||||
|
||||
it("Should return input id as the id of the select field", async () => {
|
||||
// Arrange
|
||||
const wrapper = shallowMount(dropdownQuestion, {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ export default {
|
|||
},
|
||||
isDisabled: Boolean,
|
||||
isRequired: Boolean,
|
||||
disableAutoFill: Boolean,
|
||||
validationRules: String,
|
||||
cmsWidgetName: String,
|
||||
hasError: Boolean,
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ describe("address-questions.vue", () => {
|
|||
expect(wrapper.vm.$loadScript).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test("address field is focused => disable autocomplete", async () => {
|
||||
test("address field is focused => disable autofill", async () => {
|
||||
// Arrange
|
||||
let focusEventCallbackFunction;
|
||||
autocompleteElement.addEventListener = jest
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ afterEach(() => {
|
|||
pageData: baseStoreGettersPageData,
|
||||
damage: baseStoreGettersDamage,
|
||||
payment: { insuranceCoverage: {} },
|
||||
order: {},
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,8 @@ export default {
|
|||
payment.isInsurance && payment.insuranceCoverage.coverageStatus;
|
||||
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
||||
navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal });
|
||||
} else if (this.$store.getters.order.referralNumber?.length === 6) {
|
||||
await this.navigateForwardWithSingleCarMatch();
|
||||
} else if (this.isRepair) {
|
||||
return this.$router.navigateWithSaving(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS,
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ const baseStoreGettersDamage = () => {
|
|||
store.getters = {
|
||||
pageData: baseStoreGettersPageData,
|
||||
damage: baseStoreGettersDamage,
|
||||
order: {},
|
||||
};
|
||||
store.commit = jest.fn();
|
||||
|
||||
|
|
@ -116,6 +117,7 @@ afterEach(() => {
|
|||
pageData: baseStoreGettersPageData,
|
||||
damage: baseStoreGettersDamage,
|
||||
payment: { insuranceCoverage: {} },
|
||||
order: {},
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ const baseStoreGettersDamage = () => {
|
|||
store.getters = {
|
||||
pageData: baseStoreGettersPageData,
|
||||
damage: baseStoreGettersDamage,
|
||||
order: {},
|
||||
};
|
||||
store.commit = jest.fn();
|
||||
|
||||
|
|
@ -140,6 +141,7 @@ describe("partQuestions.vue...", () => {
|
|||
};
|
||||
}),
|
||||
damage: baseStoreGettersDamage,
|
||||
order: {},
|
||||
};
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
|
|
@ -159,6 +161,7 @@ describe("partQuestions.vue...", () => {
|
|||
store.getters = {
|
||||
pageData: baseStoreGettersPageData,
|
||||
damage: baseStoreGettersDamage,
|
||||
order: {},
|
||||
};
|
||||
const { wrapper } = setupMocks({});
|
||||
const spy = jest.spyOn(wrapper.vm, "handleCompletedQuestionChainAnswers");
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ export default {
|
|||
store.getters.order.serviceLocation.zipCodeCtu &&
|
||||
(store.getters.order.damage.isRepair ||
|
||||
(store.getters.order.lineItems?.glassParts != null &&
|
||||
store.getters.order.lineItems.glassParts.length > 0))
|
||||
store.getters.order.lineItems.glassParts.length > 0)) &&
|
||||
store.getters.order.referralNumber?.length !== 6
|
||||
);
|
||||
},
|
||||
getDefaultIsInsuranceSelectedValue(availableLineItems) {
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ describe("vehicle-parts.vue", () => {
|
|||
store.getters.lineItems = { glassParts: {} };
|
||||
store.getters.vehicle = { carId: "TEST_CAR_ID" };
|
||||
store.getters.payment = { insuranceCoverage: {} };
|
||||
store.getters.order = {};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
mountOptionsMockData: {
|
||||
|
|
|
|||
|
|
@ -446,7 +446,9 @@ export default {
|
|||
|
||||
const payment = store.getters.payment;
|
||||
|
||||
if (payment.isInsurance && payment.insuranceCoverage.isVerified) {
|
||||
if (store.getters.order.referralNumber?.length === 6) {
|
||||
navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal });
|
||||
} else if (payment.isInsurance && payment.insuranceCoverage.isVerified) {
|
||||
navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal });
|
||||
} else {
|
||||
self.$router.navigateWithSaving(
|
||||
|
|
|
|||
Loading…
Reference in a new issue