Merge pull request #2788 from Safelite/feature/CASH-1348

CASH-1348 - Updated the response object model for closestShops
This commit is contained in:
CarlNation 2025-08-21 12:53:42 -04:00 committed by GitHub
commit bf878a5363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 9 additions and 9 deletions

View file

@ -757,7 +757,7 @@ function setupMocks({
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
const closestShops = {
data: {
providers: [
inShopProviders: [
{ id: 1, name: "Shop 1" },
{ id: 2, name: "Shop 2" },
],

View file

@ -308,7 +308,7 @@ export default {
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}

View file

@ -722,7 +722,7 @@ function setupMocks({
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
const closestShops = {
data: {
providers: [
inShopProviders: [
{ id: 1, name: "Shop 1" },
{ id: 2, name: "Shop 2" },
],

View file

@ -285,7 +285,7 @@ export default {
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}

View file

@ -178,7 +178,7 @@ export default {
"service-location"
);
if (!closestShops || closestShops.providers?.length === 0) {
if (!closestShops || closestShops.inShopProviders?.length === 0) {
this.displayNoServiceAlert = true;
this.focusOnZipInput();
this.resetModalButtonStyle();

View file

@ -277,7 +277,7 @@ export default {
"service-location"
);
if (!closestShops || closestShops.providers?.length === 0) {
if (!closestShops || closestShops.inShopProviders?.length === 0) {
// We need an alert for heavy trucks
return null;
}

View file

@ -277,7 +277,7 @@ export default {
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}

View file

@ -522,7 +522,7 @@ export default {
"vehicle"
);
if (!closestShops || closestShops.data?.providers?.length === 0) {
if (!closestShops || closestShops.data?.inShopProviders?.length === 0) {
this.displayNoServiceAlert = true;
if (store.getters.externalParameterState?.isExternalParameter) {
return baseMixin.methods.ResetExternalParamsAndHideModal();

View file

@ -352,7 +352,7 @@ export default {
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}