2021-11-22 09:35:29 +00:00
|
|
|
import { actions } from '../../appConfig';
|
|
|
|
|
|
|
|
const commit = jest.fn();
|
|
|
|
describe('#actions', () => {
|
|
|
|
describe('#setReferrerHost', () => {
|
|
|
|
it('creates actions properly', () => {
|
|
|
|
actions.setReferrerHost({ commit }, 'www.chatwoot.com');
|
|
|
|
expect(commit.mock.calls).toEqual([
|
|
|
|
['SET_REFERRER_HOST', 'www.chatwoot.com'],
|
|
|
|
]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2022-05-06 14:00:48 +00:00
|
|
|
describe('#setBubbleVisibility', () => {
|
|
|
|
it('creates actions properly', () => {
|
|
|
|
actions.setBubbleVisibility({ commit }, false);
|
|
|
|
expect(commit.mock.calls).toEqual([['SET_BUBBLE_VISIBILITY', false]]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-11-22 09:35:29 +00:00
|
|
|
describe('#setWidgetColor', () => {
|
|
|
|
it('creates actions properly', () => {
|
2022-01-12 10:55:27 +00:00
|
|
|
actions.setWidgetColor({ commit }, '#eaeaea');
|
|
|
|
expect(commit.mock.calls).toEqual([['SET_WIDGET_COLOR', '#eaeaea']]);
|
2021-11-22 09:35:29 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|