9024 workflow test serverless function follow up (#9066)
- Fix Tablist style - Fix dropdown style (wrong grey background) - Update dropdown variable when no outputSchema is available https://github.com/user-attachments/assets/56698fe8-8dd3-404a-b2b2-f1eca6f5fa28
This commit is contained in:
@ -10,14 +10,22 @@ describe('getFunctionOutputSchema', () => {
|
||||
e: [1, 2, 3],
|
||||
};
|
||||
const expectedOutputSchema = {
|
||||
a: { isLeaf: true, type: 'unknown', value: null },
|
||||
b: { isLeaf: true, type: 'string', value: 'b' },
|
||||
a: { isLeaf: true, type: 'unknown', value: null, icon: 'IconVariable' },
|
||||
b: { isLeaf: true, type: 'string', value: 'b', icon: 'IconVariable' },
|
||||
c: {
|
||||
isLeaf: false,
|
||||
value: { cc: { isLeaf: true, type: 'number', value: 1 } },
|
||||
icon: 'IconVariable',
|
||||
value: {
|
||||
cc: { isLeaf: true, type: 'number', value: 1, icon: 'IconVariable' },
|
||||
},
|
||||
},
|
||||
d: { isLeaf: true, type: 'boolean', value: true, icon: 'IconVariable' },
|
||||
e: {
|
||||
isLeaf: true,
|
||||
type: 'array',
|
||||
value: [1, 2, 3],
|
||||
icon: 'IconVariable',
|
||||
},
|
||||
d: { isLeaf: true, type: 'boolean', value: true },
|
||||
e: { isLeaf: true, type: 'array', value: [1, 2, 3] },
|
||||
};
|
||||
expect(getFunctionOutputSchema(testResult)).toEqual(expectedOutputSchema);
|
||||
});
|
||||
|
||||
@ -32,6 +32,7 @@ export const getFunctionOutputSchema = (testResult: object) => {
|
||||
if (isObject(value) && !Array.isArray(value)) {
|
||||
acc[key] = {
|
||||
isLeaf: false,
|
||||
icon: 'IconVariable',
|
||||
value: getFunctionOutputSchema(value),
|
||||
};
|
||||
} else {
|
||||
@ -39,6 +40,7 @@ export const getFunctionOutputSchema = (testResult: object) => {
|
||||
isLeaf: true,
|
||||
value,
|
||||
type: getValueType(value),
|
||||
icon: 'IconVariable',
|
||||
};
|
||||
}
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user