title case and unit test fixes
This commit is contained in:
parent
339ec5100e
commit
1cd4fe9e7d
2 changed files with 8 additions and 6 deletions
|
|
@ -292,7 +292,7 @@ describe('OrderConfirmation.vue', () => {
|
|||
const testValue = wrapper.vm.appointmentWordingText;
|
||||
|
||||
// Assert
|
||||
expect(testValue).toEqual('wording Text 123 Safelite Street,<br/> Mesa, AZ 12345');
|
||||
expect(testValue).toEqual('wording Text <br/>123 Safelite Street,<br/> Mesa, AZ 12345<br/>');
|
||||
});
|
||||
test('appointmentWordingText should return In Shop text in expected format', () => {
|
||||
// Arrange
|
||||
|
|
@ -302,7 +302,7 @@ describe('OrderConfirmation.vue', () => {
|
|||
const testValue = wrapper.vm.appointmentWordingText;
|
||||
|
||||
// Assert
|
||||
expect(testValue).toEqual('wording Text 123 Safelite Street,<br/> Mesa, AZ 12345');
|
||||
expect(testValue).toEqual('wording Text <br/>123 Safelite Street,<br/> Mesa, AZ 12345<br/>');
|
||||
});
|
||||
test('serviceLocationFullAddress should return text in expected format', () => {
|
||||
// Arrange
|
||||
|
|
@ -322,7 +322,7 @@ describe('OrderConfirmation.vue', () => {
|
|||
const testValue = wrapper.vm.providerFullAddress;
|
||||
|
||||
// Assert
|
||||
expect(testValue).toEqual('123 Safelite Street,<br/> Mesa, AZ 12345');
|
||||
expect(testValue).toEqual('<br/>123 Safelite Street,<br/> Mesa, AZ 12345<br/>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ import { Form } from 'vee-validate';
|
|||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||
import { useMainStore } from '@/store';
|
||||
import { get12HourTimeFormat, get12HourTimeMobileFormat, convertDateStringToDate } from '@/helpers/date-helper.js';
|
||||
import { toTitleCase } from '@/helpers/text-helper.js';
|
||||
|
||||
export default {
|
||||
name: 'order-confirmation',
|
||||
|
|
@ -150,10 +151,10 @@ export default {
|
|||
return `<br/>${this.serviceLocationAddress}, ${this.serviceLocationAddress2 ? `${this.serviceLocationAddress2},` : ''}<br/> ${this.serviceLocationCity}, ${this.serviceLocationState} ${this.serviceLocationZipCode}<br/>`;
|
||||
},
|
||||
providerAddress() {
|
||||
return this.mainStore.order.serviceLocation.provider.address.streetAddress;
|
||||
return toTitleCase(this.mainStore.order.serviceLocation.provider.address.streetAddress);
|
||||
},
|
||||
providerCity() {
|
||||
return this.mainStore.order.serviceLocation.provider.address.city;
|
||||
return toTitleCase(this.mainStore.order.serviceLocation.provider.address.city);
|
||||
},
|
||||
providerState() {
|
||||
return this.mainStore.order.serviceLocation.provider.address.state;
|
||||
|
|
@ -162,7 +163,8 @@ export default {
|
|||
return this.mainStore.order.serviceLocation.provider.address.zipCode;
|
||||
},
|
||||
providerFullAddress() {
|
||||
return `${this.providerAddress},<br/> ${this.providerCity}, ${this.providerState} ${this.providerZipCode}`;
|
||||
// eslint-disable-next-line max-len
|
||||
return `<br/>${this.providerAddress},<br/> ${this.providerCity}, ${this.providerState} ${this.providerZipCode}<br/>`;
|
||||
},
|
||||
appointmentWordingText() {
|
||||
return this.formatWordingText(this.appointmentType);
|
||||
|
|
|
|||
Loading…
Reference in a new issue