mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
feat(editor): Popping logs out into a new window (#13788)
This commit is contained in:
@@ -2923,28 +2923,28 @@ describe('useCanvasOperations', () => {
|
||||
});
|
||||
|
||||
describe('toggleChatOpen', () => {
|
||||
it('should invoke workflowsStore#setPanelOpen with 2nd argument `true` if the chat panel is closed', async () => {
|
||||
it('should invoke workflowsStore#setPanelState with 1st argument "docked" if the chat panel is closed', async () => {
|
||||
const workflowsStore = mockedStore(useWorkflowsStore);
|
||||
const { toggleChatOpen } = useCanvasOperations({ router });
|
||||
|
||||
workflowsStore.getCurrentWorkflow.mockReturnValue(createTestWorkflowObject());
|
||||
workflowsStore.isChatPanelOpen = false;
|
||||
workflowsStore.chatPanelState = 'closed';
|
||||
|
||||
await toggleChatOpen('main');
|
||||
|
||||
expect(workflowsStore.setPanelOpen).toHaveBeenCalledWith('chat', true);
|
||||
expect(workflowsStore.setPanelState).toHaveBeenCalledWith('attached');
|
||||
});
|
||||
|
||||
it('should invoke workflowsStore#setPanelOpen with 2nd argument `false` if the chat panel is open', async () => {
|
||||
it('should invoke workflowsStore#setPanelState with 1st argument "collapsed" if the chat panel is open', async () => {
|
||||
const workflowsStore = mockedStore(useWorkflowsStore);
|
||||
const { toggleChatOpen } = useCanvasOperations({ router });
|
||||
|
||||
workflowsStore.getCurrentWorkflow.mockReturnValue(createTestWorkflowObject());
|
||||
workflowsStore.isChatPanelOpen = true;
|
||||
workflowsStore.chatPanelState = 'attached';
|
||||
|
||||
await toggleChatOpen('main');
|
||||
|
||||
expect(workflowsStore.setPanelOpen).toHaveBeenCalledWith('chat', false);
|
||||
expect(workflowsStore.setPanelState).toHaveBeenCalledWith('closed');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user