2021-11-22 09:35:29 +00:00
|
|
|
import { mutations } from '../../appConfig';
|
|
|
|
|
|
|
|
describe('#mutations', () => {
|
|
|
|
describe('#SET_REFERRER_HOST', () => {
|
|
|
|
it('sets referrer host properly', () => {
|
|
|
|
const state = { referrerHost: '' };
|
|
|
|
mutations.SET_REFERRER_HOST(state, 'www.chatwoot.com');
|
|
|
|
expect(state.referrerHost).toEqual('www.chatwoot.com');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2022-05-06 14:00:48 +00:00
|
|
|
describe('#SET_BUBBLE_VISIBILITY', () => {
|
|
|
|
it('sets bubble visibility properly', () => {
|
|
|
|
const state = { hideMessageBubble: false };
|
|
|
|
mutations.SET_BUBBLE_VISIBILITY(state, true);
|
|
|
|
expect(state.hideMessageBubble).toEqual(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-11-22 09:35:29 +00:00
|
|
|
describe('#SET_WIDGET_COLOR', () => {
|
|
|
|
it('sets widget color properly', () => {
|
|
|
|
const state = { widgetColor: '' };
|
2022-01-12 10:55:27 +00:00
|
|
|
mutations.SET_WIDGET_COLOR(state, '#00bcd4');
|
2021-11-22 09:35:29 +00:00
|
|
|
expect(state.widgetColor).toEqual('#00bcd4');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|