feat: add Part primitive task selection
This commit is contained in:
@@ -791,14 +791,15 @@ test('Part workbench commands create primitive and boolean document objects', ()
|
||||
facade.task.apply()
|
||||
assert.equal(facade.app.document.getObject('box')?.typeId, 'Part::Box')
|
||||
facade.gui.command.execute({ commandId: 'primitive' })
|
||||
facade.task.update({ primitiveType: 'Cylinder' })
|
||||
facade.task.apply()
|
||||
assert.equal(facade.app.document.getObject('box001')?.typeId, 'Part::Box')
|
||||
assert.equal(facade.app.document.getObject('cylinder')?.typeId, 'Part::Cylinder')
|
||||
|
||||
assert.equal(facade.gui.command.getState('union').status, 'enabled')
|
||||
facade.gui.command.execute({ commandId: 'union' })
|
||||
facade.task.apply()
|
||||
assert.equal(facade.app.document.getObject('union')?.typeId, 'Part::Fuse')
|
||||
facade.app.document.setProperty({ objectId: 'union', propertyName: 'Base', value: 'box' })
|
||||
facade.app.document.setProperty({ objectId: 'union', propertyName: 'Tool', value: 'box001' })
|
||||
assert.deepEqual(facade.app.document.getDependencies().filter((edge) => edge.sourceId === 'union').map((edge) => edge.targetId).sort(), ['box', 'box001'])
|
||||
facade.app.document.setProperty({ objectId: 'union', propertyName: 'Tool', value: 'cylinder' })
|
||||
assert.deepEqual(facade.app.document.getDependencies().filter((edge) => edge.sourceId === 'union').map((edge) => edge.targetId).sort(), ['box', 'cylinder'])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user