Continued migration to nested sets
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
import { applyNestedSetProperties } from '/imports/api/parenting/parentingFunctions';
|
||||
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
@@ -37,38 +38,37 @@ var testProperties = [
|
||||
_id: 'enabledToggleId',
|
||||
type: 'toggle',
|
||||
enabled: true,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'disabledToggleId',
|
||||
type: 'toggle',
|
||||
disabled: true,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleId',
|
||||
type: 'toggle',
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
// Children
|
||||
clean({
|
||||
_id: 'enabledToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{ id: 'charId' }, { id: 'enabledToggleId' }],
|
||||
parentId: 'enabledToggleId',
|
||||
}),
|
||||
clean({
|
||||
_id: 'disabledToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{ id: 'charId' }, { id: 'disabledToggleId' }],
|
||||
parentId: 'disabledToggleId',
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{ id: 'charId' }, { id: 'conditionToggleId' }],
|
||||
parentId: 'conditionToggleId',
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleGrandChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{ id: 'charId' }, { id: 'conditionToggleId' }, { id: 'conditionToggleChildId' }],
|
||||
parentId: 'conditionToggleChildId',
|
||||
}),
|
||||
];
|
||||
|
||||
applyNestedSetProperties(testProperties);
|
||||
|
||||
Reference in New Issue
Block a user