feat: persist primitive task parameters

This commit is contained in:
2026-08-02 19:33:43 -04:00
parent 589b2eb0f6
commit ca9b18ea59
3 changed files with 15 additions and 2 deletions

View File

@@ -794,9 +794,12 @@ 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.update({ primitiveType: 'Cylinder', radius: 3, height: 12, angle: 180 })
facade.task.apply()
assert.equal(facade.app.document.getObject('cylinder')?.typeId, 'Part::Cylinder')
assert.equal(facade.app.document.getObject('cylinder')?.properties.find((property) => property.name === 'Radius')?.value, 3)
assert.equal(facade.app.document.getObject('cylinder')?.properties.find((property) => property.name === 'Height')?.value, 12)
assert.equal(facade.app.document.getObject('cylinder')?.properties.find((property) => property.name === 'Angle')?.value, 180)
assert.equal(facade.gui.command.getState('union').status, 'enabled')
facade.gui.command.execute({ commandId: 'union' })