HH-530: replace user-facing Chatwoot branding with GoChat (#117)
* fix(HH-530): replace user-facing Chatwoot branding * fix(HH-530): close branding review blockers * test(HH-530): cover update banner binding --------- Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import { createStore } from 'vuex';
|
||||
import Banner from 'dashboard/components/ui/Banner.vue';
|
||||
import UpdateBanner from '../UpdateBanner.vue';
|
||||
|
||||
vi.mock('dashboard/composables/useAdmin', () => ({
|
||||
useAdmin: () => ({ isAdmin: true }),
|
||||
}));
|
||||
|
||||
it('interpolates the available version into the GoChat update message', () => {
|
||||
const store = createStore({
|
||||
modules: {
|
||||
globalConfig: {
|
||||
namespaced: true,
|
||||
getters: {
|
||||
get: () => ({ appVersion: '4.14.0', displayManifest: true }),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
const wrapper = shallowMount(UpdateBanner, {
|
||||
props: { latestChatwootVersion: '4.15.0' },
|
||||
global: { plugins: [store] },
|
||||
});
|
||||
|
||||
expect(wrapper.findComponent(Banner).props('bannerMessage')).toBe(
|
||||
'An update 4.15.0 for GoChat is available. Please update your instance.'
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user