Initial commit: Add logistics and order_detail message types
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { actions } from '../../conversationPage';
|
||||
import * as types from '../../../mutation-types';
|
||||
|
||||
const commit = vi.fn();
|
||||
|
||||
describe('#actions', () => {
|
||||
describe('#setCurrentPage', () => {
|
||||
it('sends correct actions', () => {
|
||||
actions.setCurrentPage({ commit }, { filter: 'me', page: 1 });
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.default.SET_CURRENT_PAGE, { filter: 'me', page: 1 }],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#setEndReached', () => {
|
||||
it('sends correct actions', () => {
|
||||
actions.setEndReached({ commit }, { filter: 'me' });
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.default.SET_CONVERSATION_END_REACHED, { filter: 'me' }],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#reset', () => {
|
||||
it('sends correct actions', () => {
|
||||
actions.reset({ commit });
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.default.CLEAR_CONVERSATION_PAGE],
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import { getters } from '../../conversationPage';
|
||||
|
||||
describe('#getters', () => {
|
||||
it('getCurrentPage', () => {
|
||||
const state = {
|
||||
currentPage: {
|
||||
me: 1,
|
||||
unassigned: 2,
|
||||
all: 3,
|
||||
},
|
||||
};
|
||||
expect(getters.getCurrentPage(state)).toHaveProperty('me');
|
||||
expect(getters.getCurrentPage(state)).toHaveProperty('unassigned');
|
||||
expect(getters.getCurrentPage(state)).toHaveProperty('all');
|
||||
});
|
||||
|
||||
it('getCurrentPageFilter', () => {
|
||||
const state = {
|
||||
currentPage: {
|
||||
me: 1,
|
||||
unassigned: 2,
|
||||
all: 3,
|
||||
},
|
||||
};
|
||||
expect(getters.getCurrentPageFilter(state)('me')).toEqual(1);
|
||||
expect(getters.getCurrentPageFilter(state)('unassigned')).toEqual(2);
|
||||
expect(getters.getCurrentPageFilter(state)('all')).toEqual(3);
|
||||
});
|
||||
|
||||
it('getHasEndReached', () => {
|
||||
const state = {
|
||||
hasEndReached: {
|
||||
me: false,
|
||||
unassigned: true,
|
||||
all: false,
|
||||
},
|
||||
};
|
||||
expect(getters.getHasEndReached(state)('me')).toEqual(false);
|
||||
expect(getters.getHasEndReached(state)('unassigned')).toEqual(true);
|
||||
expect(getters.getHasEndReached(state)('all')).toEqual(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
import * as types from '../../../mutation-types';
|
||||
import { mutations } from '../../conversationPage';
|
||||
|
||||
describe('#mutations', () => {
|
||||
describe('#SET_CURRENT_PAGE', () => {
|
||||
it('set current page correctly', () => {
|
||||
const state = { currentPage: { me: 1 } };
|
||||
mutations[types.default.SET_CURRENT_PAGE](state, {
|
||||
filter: 'me',
|
||||
page: 2,
|
||||
});
|
||||
expect(state.currentPage).toEqual({
|
||||
me: 2,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#CLEAR_CONVERSATION_PAGE', () => {
|
||||
it('resets the state to initial state', () => {
|
||||
const state = {
|
||||
currentPage: { me: 1, unassigned: 2, all: 3 },
|
||||
hasEndReached: { me: true, unassigned: true, all: true },
|
||||
};
|
||||
mutations[types.default.CLEAR_CONVERSATION_PAGE](state);
|
||||
expect(state).toEqual({
|
||||
currentPage: { me: 0, unassigned: 0, all: 0, appliedFilters: 0 },
|
||||
hasEndReached: {
|
||||
me: false,
|
||||
unassigned: false,
|
||||
all: false,
|
||||
appliedFilters: false,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#SET_CONVERSATION_END_REACHED', () => {
|
||||
it('set conversation end reached correctly', () => {
|
||||
const state = {
|
||||
hasEndReached: { me: false, unassigned: false, all: false },
|
||||
};
|
||||
mutations[types.default.SET_CONVERSATION_END_REACHED](state, {
|
||||
filter: 'me',
|
||||
});
|
||||
expect(state.hasEndReached).toEqual({
|
||||
me: true,
|
||||
unassigned: false,
|
||||
all: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('set all state to true if all end has reached', () => {
|
||||
const state = {
|
||||
hasEndReached: { me: false, unassigned: false, all: false },
|
||||
};
|
||||
mutations[types.default.SET_CONVERSATION_END_REACHED](state, {
|
||||
filter: 'all',
|
||||
});
|
||||
expect(state.hasEndReached).toEqual({
|
||||
me: true,
|
||||
unassigned: true,
|
||||
all: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user