diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/components/AccountHealth.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/components/AccountHealth.vue index adbf9d0c1..2eddb7f6b 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/components/AccountHealth.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/components/AccountHealth.vue @@ -412,7 +412,7 @@ const handleCopyWebhookUrl = async url => { -
+

{{ section.title }} diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/components/specs/AccountHealth.spec.js b/app/javascript/dashboard/routes/dashboard/settings/inbox/components/specs/AccountHealth.spec.js index d771318e4..cca7bfbb5 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/components/specs/AccountHealth.spec.js +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/components/specs/AccountHealth.spec.js @@ -11,9 +11,9 @@ vi.mock('vue-i18n', () => ({ })); describe('AccountHealth', () => { - const mountComponent = healthData => + const mountComponent = (healthData, props = {}) => shallowMount(AccountHealth, { - props: { healthData }, + props: { healthData, ...props }, }); beforeEach(() => { @@ -66,4 +66,20 @@ describe('AccountHealth', () => { 'INBOX_MGMT.ACCOUNT_HEALTH.VALUES.MODES.CUSTOM_MODE' ); }); + + it('shows the current error instead of stale health data', () => { + const wrapper = mountComponent( + { verified_name: 'Stale Business Name' }, + { + healthError: { + type: 'authorization', + message: 'The connection needs to be refreshed', + }, + isEmbeddedSignup: true, + } + ); + + expect(wrapper.text()).toContain('The connection needs to be refreshed'); + expect(wrapper.text()).not.toContain('Stale Business Name'); + }); });