Open filters in side panel (#13304)
In this PR: - Open filters in the side panel for **workflows** - Open filters in the side panel for **workflow versions** - Preparation for opening filters in the side panel for **workflow runs** - Add many tests to increase the coverage Remaining to do: - Open filters in the side panel for **workflow runs** - Upon filter creation, open it in the side panel --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
eeade6e94c
commit
924e599cba
+50
@@ -0,0 +1,50 @@
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { isWorkflowRelatedObjectMetadata } from '@/object-metadata/utils/isWorkflowRelatedObjectMetadata';
|
||||
|
||||
describe('isWorkflowRelatedObjectMetadata', () => {
|
||||
it('should return true for Workflow object', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata(
|
||||
CoreObjectNameSingular.Workflow,
|
||||
);
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('should return true for WorkflowVersion object', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata(
|
||||
CoreObjectNameSingular.WorkflowVersion,
|
||||
);
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('should return true for WorkflowRun object', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata(
|
||||
CoreObjectNameSingular.WorkflowRun,
|
||||
);
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false for non-workflow related objects', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata(
|
||||
CoreObjectNameSingular.Company,
|
||||
);
|
||||
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false for unknown object names', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata('unknownObject');
|
||||
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false for Person object', () => {
|
||||
const result = isWorkflowRelatedObjectMetadata(
|
||||
CoreObjectNameSingular.Person,
|
||||
);
|
||||
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { isWorkflowSubObjectMetadata } from '@/object-metadata/utils/isWorkflowSubObjectMetadata';
|
||||
import { CoreObjectNameSingular } from '../types/CoreObjectNameSingular';
|
||||
|
||||
export const isWorkflowRelatedObjectMetadata = (objectNameSingular: string) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user