Merge pull request #1091 from Safelite/feature/kiener/INSR-8513

INSR-8513 | Map address title casing fix
This commit is contained in:
scottkiener-at-safelite 2026-02-18 08:26:22 -05:00 committed by GitHub
commit 76b899fcf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -355,7 +355,7 @@ describe('tpa-search.vue', () => {
// Assert
expect(result.length).toBe(1);
expect(result[0].title).toBe('test shop');
expect(result[0].title).toBe('Test Shop');
expect(result[0].addressLines.length).toBe(2);
});
@ -395,7 +395,7 @@ describe('tpa-search.vue', () => {
// Assert
expect(result.length).toBe(1);
expect(result[0].buttonLabel).toBe('auto glass shop');
expect(result[0].buttonLabel).toBe('Auto Glass Shop');
expect(result[0].buttonLabelSubCopy).toBe('5.8 mi');
expect(result[0].value).toBe('12345');
});
@ -616,7 +616,7 @@ describe('tpa-search.vue', () => {
const result = wrapper.vm.getShopButtonDataFromProvider(provider);
// Assert
expect(result.buttonLabel).toBe('test shop');
expect(result.buttonLabel).toBe('Test Shop');
expect(result.buttonLabelSubCopy).toBe('5.8 mi');
expect(result.value).toBe('12345');
expect(result.buttonBodyCopy).toContain('<br>');

View file

@ -265,7 +265,7 @@ export default {
},
providerAddresses() {
return this.radiusFilteredAndCappedProviders?.map((provider) => ({
title: provider.companyName.toLowerCase(),
title: toTitleCase(provider.companyName),
fullAddress: this.getFullProviderAddress(provider),
addressLines: [this.getProviderAddress(provider), this.getProviderCityZipState(provider)]
})) ?? [];
@ -395,7 +395,7 @@ export default {
: null;
return {
buttonLabel: provider?.companyName.toLowerCase() ?? '',
buttonLabel: toTitleCase(provider?.companyName) ?? '',
buttonLabelSubCopy: distance === null ? '' : `${distance} mi`,
buttonBodyCopy: `${this.getFullProviderAddress(provider)}<br>${
cellNumber ?? ''