Implement branch front end (#13489)
First PR to support workflow branches on frontend
This commit is contained in:
+14
@@ -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);
|
||||
});
|
||||
});
|
||||
+16
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user