offsetPlane kwargs (#5367)

Previously: `offsetPlane('XY', 75)`
Now: `offsetPlane('XY', offset = 75)`

Pairs with this KCL-samples PR: https://github.com/KittyCAD/kcl-samples/pull/163
This commit is contained in:
Adam Chalmers
2025-02-13 13:37:02 -06:00
committed by GitHub
parent 5d02a27122
commit 78b42ea191
21 changed files with 320 additions and 297 deletions

View File

@ -1304,7 +1304,7 @@ test.describe(`Sketching with offset planes`, () => {
await context.addInitScript(() => {
localStorage.setItem(
'persistCode',
`offsetPlane001 = offsetPlane("XY", 10)`
`offsetPlane001 = offsetPlane("XY", offset = 10)`
)
})
@ -1318,9 +1318,9 @@ test.describe(`Sketching with offset planes`, () => {
await test.step(`Hovering should highlight code`, async () => {
await planeHover()
await editor.expectState({
activeLines: [`offsetPlane001=offsetPlane("XY",10)`],
activeLines: [`offsetPlane001=offsetPlane("XY",offset=10)`],
diagnostics: [],
highlightedCode: 'offsetPlane("XY", 10)',
highlightedCode: 'offsetPlane("XY", offset = 10)',
})
})
@ -1331,7 +1331,7 @@ test.describe(`Sketching with offset planes`, () => {
await expect(toolbar.lineBtn).toBeEnabled()
await editor.expectEditor.toContain('startSketchOn(offsetPlane001)')
await editor.expectState({
activeLines: [`offsetPlane001=offsetPlane("XY",10)`],
activeLines: [`offsetPlane001=offsetPlane("XY",offset=10)`],
diagnostics: [],
highlightedCode: '',
})