mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(editor): Use remote filtering for error workflow search in settings (#17624)
This commit is contained in:
committed by
GitHub
parent
a9c29e340a
commit
e1ef35a2b4
@@ -30,7 +30,7 @@ let settingsStore: MockedStore<typeof useSettingsStore>;
|
||||
let sourceControlStore: MockedStore<typeof useSourceControlStore>;
|
||||
let pinia: ReturnType<typeof createTestingPinia>;
|
||||
|
||||
let fetchAllWorkflowsSpy: MockInstance<(typeof workflowsStore)['fetchAllWorkflows']>;
|
||||
let searchWorkflowsSpy: MockInstance<(typeof workflowsStore)['searchWorkflows']>;
|
||||
|
||||
const createComponent = createComponentRenderer(WorkflowSettingsVue, {
|
||||
global: {
|
||||
@@ -55,7 +55,7 @@ describe('WorkflowSettingsVue', () => {
|
||||
} as FrontendSettings;
|
||||
workflowsStore.workflowName = 'Test Workflow';
|
||||
workflowsStore.workflowId = '1';
|
||||
fetchAllWorkflowsSpy = workflowsStore.fetchAllWorkflows.mockResolvedValue([
|
||||
searchWorkflowsSpy = workflowsStore.searchWorkflows.mockResolvedValue([
|
||||
{
|
||||
id: '1',
|
||||
name: 'Test Workflow',
|
||||
@@ -134,8 +134,12 @@ describe('WorkflowSettingsVue', () => {
|
||||
// first is `- No Workflow -`, second is the workflow returned by
|
||||
// `workflowsStore.fetchAllWorkflows`
|
||||
expect(dropdownItems).toHaveLength(2);
|
||||
expect(fetchAllWorkflowsSpy).toHaveBeenCalledTimes(1);
|
||||
expect(fetchAllWorkflowsSpy).toHaveBeenCalledWith();
|
||||
expect(searchWorkflowsSpy).toHaveBeenCalledTimes(1);
|
||||
expect(searchWorkflowsSpy).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
name: undefined,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('should not remove valid workflow ID characters', async () => {
|
||||
|
||||
Reference in New Issue
Block a user