remove linemath and tablemath
This commit is contained in:
@@ -12,7 +12,7 @@ test('serializeExecutionGraph excludes isolated nodes from the backend prompt',
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {
|
||||
input: { required: { filename: ['FILE_PICKER', {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -34,7 +34,7 @@ test('serializeExecutionGraph excludes isolated nodes from the backend prompt',
|
||||
{
|
||||
id: '3',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {
|
||||
input: { required: { filename: ['FILE_PICKER', {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -56,7 +56,7 @@ test('serializeExecutionGraph excludes isolated nodes from the backend prompt',
|
||||
|
||||
assert.deepEqual(prompt, {
|
||||
'1': {
|
||||
class_type: 'LoadFile',
|
||||
class_type: 'Image',
|
||||
inputs: { filename: 'scan.gwy' },
|
||||
},
|
||||
'2': {
|
||||
@@ -72,7 +72,7 @@ test('serializeExecutionGraph includes isolated preview-load nodes alongside con
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {
|
||||
input: { required: { filename: ['FILE_PICKER', {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -94,7 +94,7 @@ test('serializeExecutionGraph includes isolated preview-load nodes alongside con
|
||||
{
|
||||
id: '3',
|
||||
data: {
|
||||
className: 'LoadDemo',
|
||||
className: 'ImageDemo',
|
||||
definition: {
|
||||
input: { required: { name: [['demo.npy'], {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -105,7 +105,7 @@ test('serializeExecutionGraph includes isolated preview-load nodes alongside con
|
||||
{
|
||||
id: '4',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {
|
||||
input: { required: { filename: ['FILE_PICKER', {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -127,7 +127,7 @@ test('serializeExecutionGraph includes isolated preview-load nodes alongside con
|
||||
|
||||
assert.deepEqual(prompt, {
|
||||
'1': {
|
||||
class_type: 'LoadFile',
|
||||
class_type: 'Image',
|
||||
inputs: { filename: 'first.gwy' },
|
||||
},
|
||||
'2': {
|
||||
@@ -135,19 +135,19 @@ test('serializeExecutionGraph includes isolated preview-load nodes alongside con
|
||||
inputs: { field: ['1', 0] },
|
||||
},
|
||||
'3': {
|
||||
class_type: 'LoadDemo',
|
||||
class_type: 'ImageDemo',
|
||||
inputs: { name: 'demo.npy' },
|
||||
},
|
||||
});
|
||||
assert.equal('4' in prompt, false);
|
||||
});
|
||||
|
||||
test('serializeExecutionGraph allows a singleton LoadFile graph so previews can run', () => {
|
||||
test('serializeExecutionGraph allows a singleton Image graph so previews can run', () => {
|
||||
const nodes = [
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {
|
||||
input: { required: { filename: ['FILE_PICKER', {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -161,18 +161,18 @@ test('serializeExecutionGraph allows a singleton LoadFile graph so previews can
|
||||
|
||||
assert.deepEqual(prompt, {
|
||||
'1': {
|
||||
class_type: 'LoadFile',
|
||||
class_type: 'Image',
|
||||
inputs: { filename: 'scan.gwy' },
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('serializeExecutionGraph allows a singleton LoadDemo graph so previews can run', () => {
|
||||
test('serializeExecutionGraph allows a singleton ImageDemo graph so previews can run', () => {
|
||||
const nodes = [
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadDemo',
|
||||
className: 'ImageDemo',
|
||||
definition: {
|
||||
input: { required: { name: [['demo.npy'], {}] }, optional: {} },
|
||||
manual_trigger: false,
|
||||
@@ -186,7 +186,7 @@ test('serializeExecutionGraph allows a singleton LoadDemo graph so previews can
|
||||
|
||||
assert.deepEqual(prompt, {
|
||||
'1': {
|
||||
class_type: 'LoadDemo',
|
||||
class_type: 'ImageDemo',
|
||||
inputs: { name: 'demo.npy' },
|
||||
},
|
||||
});
|
||||
@@ -214,10 +214,10 @@ test('getAutoRunnableNodes ignores disconnected nodes when deciding what can aut
|
||||
|
||||
test('getAutoRunnableNodes includes isolated preview-load nodes with selections', () => {
|
||||
const nodes = [
|
||||
{ id: '1', data: { className: 'LoadFile', definition: {}, widgetValues: { filename: 'first.gwy' } } },
|
||||
{ id: '1', data: { className: 'Image', definition: {}, widgetValues: { filename: 'first.gwy' } } },
|
||||
{ id: '2', data: { className: 'PreviewImage', definition: {}, widgetValues: {} } },
|
||||
{ id: '3', data: { className: 'LoadDemo', definition: {}, widgetValues: { name: 'demo.npy' } } },
|
||||
{ id: '4', data: { className: 'LoadFile', definition: {}, widgetValues: { filename: '' } } },
|
||||
{ id: '3', data: { className: 'ImageDemo', definition: {}, widgetValues: { name: 'demo.npy' } } },
|
||||
{ id: '4', data: { className: 'Image', definition: {}, widgetValues: { filename: '' } } },
|
||||
];
|
||||
const edges = [
|
||||
{
|
||||
@@ -233,12 +233,12 @@ test('getAutoRunnableNodes includes isolated preview-load nodes with selections'
|
||||
assert.deepEqual(runnable.map((node) => node.id), ['1', '2', '3']);
|
||||
});
|
||||
|
||||
test('getAutoRunnableNodes allows a singleton LoadFile graph', () => {
|
||||
test('getAutoRunnableNodes allows a singleton Image graph', () => {
|
||||
const nodes = [
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
definition: {},
|
||||
widgetValues: { filename: 'scan.gwy' },
|
||||
},
|
||||
@@ -250,12 +250,12 @@ test('getAutoRunnableNodes allows a singleton LoadFile graph', () => {
|
||||
assert.deepEqual(runnable.map((node) => node.id), ['1']);
|
||||
});
|
||||
|
||||
test('getAutoRunnableNodes allows a singleton LoadDemo graph', () => {
|
||||
test('getAutoRunnableNodes allows a singleton ImageDemo graph', () => {
|
||||
const nodes = [
|
||||
{
|
||||
id: '1',
|
||||
data: {
|
||||
className: 'LoadDemo',
|
||||
className: 'ImageDemo',
|
||||
definition: {},
|
||||
widgetValues: { name: 'demo.npy' },
|
||||
},
|
||||
|
||||
@@ -103,7 +103,7 @@ test('hydrateWorkflowState clears shared path widgets while restoring saved dyna
|
||||
id: '12',
|
||||
position: { x: 40, y: 80 },
|
||||
data: {
|
||||
className: 'LoadFile',
|
||||
className: 'Image',
|
||||
widgetValues: { filename: 'scan.ibw', colormap: 'viridis' },
|
||||
output: ['DATA_FIELD', 'DATA_FIELD'],
|
||||
output_name: ['Height', 'Phase'],
|
||||
@@ -123,7 +123,7 @@ test('hydrateWorkflowState clears shared path widgets while restoring saved dyna
|
||||
};
|
||||
|
||||
const defs = {
|
||||
LoadFile: {
|
||||
Image: {
|
||||
category: 'io',
|
||||
input: { required: { filename: ['FILE_PICKER', {}], colormap: [['viridis', 'gray'], {}] } },
|
||||
output: ['DATA_FIELD'],
|
||||
@@ -138,13 +138,13 @@ test('hydrateWorkflowState clears shared path widgets while restoring saved dyna
|
||||
assert.deepEqual(hydrated.edges, saved.edges);
|
||||
assert.equal(hydrated.nodes[0].type, 'custom');
|
||||
assert.equal(hydrated.nodes[0].dragHandle, '.drag-handle');
|
||||
assert.equal(hydrated.nodes[0].data.label, 'LoadFile');
|
||||
assert.equal(hydrated.nodes[0].data.label, 'Image');
|
||||
assert.equal(hydrated.nodes[0].data.previewImage, null);
|
||||
assert.equal(hydrated.nodes[0].data.widgetValues.filename, '');
|
||||
assert.equal(hydrated.nodes[0].data.widgetValues.colormap, 'viridis');
|
||||
assert.deepEqual(hydrated.nodes[0].data.definition.output, ['DATA_FIELD', 'DATA_FIELD']);
|
||||
assert.deepEqual(hydrated.nodes[0].data.definition.output_name, ['Height', 'Phase']);
|
||||
assert.deepEqual(hydrated.nodes[0].data.definition.input, defs.LoadFile.input);
|
||||
assert.deepEqual(hydrated.nodes[0].data.definition.input, defs.Image.input);
|
||||
});
|
||||
|
||||
test('serializeWorkflowState and hydrateWorkflowState clear path-like widgets but preserve other metadata', () => {
|
||||
@@ -153,8 +153,8 @@ test('serializeWorkflowState and hydrateWorkflowState clear path-like widgets bu
|
||||
id: '7',
|
||||
position: { x: 10, y: 20 },
|
||||
data: {
|
||||
label: 'Load File',
|
||||
className: 'LoadFile',
|
||||
label: 'Image',
|
||||
className: 'Image',
|
||||
widgetValues: { filename: 'scan.gwy', colormap: 'gray' },
|
||||
definition: {
|
||||
category: 'io',
|
||||
@@ -176,7 +176,7 @@ test('serializeWorkflowState and hydrateWorkflowState clear path-like widgets bu
|
||||
},
|
||||
];
|
||||
const defs = {
|
||||
LoadFile: {
|
||||
Image: {
|
||||
category: 'io',
|
||||
input: { required: { filename: ['FILE_PICKER', {}], colormap: [['gray', 'viridis'], {}] } },
|
||||
output: ['DATA_FIELD'],
|
||||
|
||||
Reference in New Issue
Block a user