MCPcopy
hub / github.com/bugy/script-server / prepareMultiDependantConfig

Function prepareMultiDependantConfig

web-src/tests/unit/scriptConfig_test.js:445–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443 }
444
445 async function prepareMultiDependantConfig() {
446 const config = createConfig([{
447 name: 'p1',
448 type: 'list',
449 values: [1, 2, 3],
450 'requiredParameters': ['param1']
451 }, {
452 name: 'p2',
453 type: 'list',
454 values: [9, 8, 7],
455 'requiredParameters': ['param1']
456 }])
457
458 sendEventFromServer(createConfigEvent(config));
459 await vueTicks()
460
461 store.dispatch('scriptConfig/sendParameterValue', {
462 parameterName: 'param1',
463 value: 1
464 });
465 await vueTicks()
466
467 assertLoading('p1', true)
468 assertLoading('p2', true)
469 }
470
471 it('test set parameter to loading on dependency change', async function () {
472 store.dispatch('scriptConfig/sendParameterValue', {parameterName: 'param1', value: 123});

Callers 1

Calls 5

vueTicksFunction · 0.90
createConfigFunction · 0.85
sendEventFromServerFunction · 0.85
createConfigEventFunction · 0.85
assertLoadingFunction · 0.85

Tested by

no test coverage detected