Implement branch front end (#13489)

First PR to support workflow branches on frontend
This commit is contained in:
martmull
2025-08-04 16:11:46 +02:00
committed by GitHub
parent 2c87c6fc1b
commit 9a05673093
124 changed files with 3735 additions and 938 deletions
@@ -0,0 +1,14 @@
import { isBaseOutputSchema } from '@/workflow/workflow-variables/utils/isBaseOutputSchema';
describe('isBaseOutputSchema', () => {
// This looks weird, but that is the way this method was built
it('should return false for base output schema', () => {
expect(
isBaseOutputSchema({ _outputSchemaType: 'LINK', link: { isLeaf: true } }),
).toBe(false);
});
it('should return true in other cases', () => {
expect(isBaseOutputSchema({})).toBe(true);
});
});
@@ -0,0 +1,16 @@
import { isFieldTypeCompatibleWithRecordId } from '@/workflow/workflow-variables/utils/isFieldTypeCompatibleWithRecordId';
describe('isFieldTypeCompatibleWithRecordId', () => {
it('should return true', () => {
expect(isFieldTypeCompatibleWithRecordId('string')).toBe(true);
expect(isFieldTypeCompatibleWithRecordId('unknown')).toBe(true);
expect(isFieldTypeCompatibleWithRecordId()).toBe(true);
expect(isFieldTypeCompatibleWithRecordId(undefined)).toBe(true);
});
it('should return false', () => {
expect(isFieldTypeCompatibleWithRecordId('number')).toBe(false);
expect(isFieldTypeCompatibleWithRecordId('boolean')).toBe(false);
expect(isFieldTypeCompatibleWithRecordId('object')).toBe(false);
expect(isFieldTypeCompatibleWithRecordId('array')).toBe(false);
});
});