Automatic fixing of deprecations and use non-quoted default planes by default (#5902)

* Automatic fixing of deprecations and use non-quoted default planes by default

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Nick Cameron
2025-03-21 22:39:12 +13:00
committed by GitHub
parent 06b35b76ff
commit e8feb0309b
235 changed files with 1227 additions and 1097 deletions

View File

@ -65,7 +65,7 @@ baseHeight = 1
totalHeightHalf = 2
armThick = 0.5
totalLen = 9.5
part001 = startSketchOn('-XZ')
part001 = startSketchOn(-XZ)
|> startProfileAt([0, 0], %)
|> yLine(length = baseHeight)
|> xLine(length = baseLen)
@ -322,7 +322,7 @@ const extrudeDefaultPlane = async (
scene: SceneFixture,
plane: string
) => {
const code = `part001 = startSketchOn('${plane}')
const code = `part001 = startSketchOn(${plane})
|> startProfileAt([7.00, 4.40], %)
|> line(end = [6.60, -0.20])
|> line(end = [2.80, 5.00])
@ -446,7 +446,7 @@ test(
// select a plane
await page.mouse.click(700, 200)
let code = `sketch001 = startSketchOn('XZ')`
let code = `sketch001 = startSketchOn(XZ)`
await expect(page.locator('.cm-content')).toHaveText(code)
await page.waitForTimeout(700) // TODO detect animation ending, or disable animation
@ -560,7 +560,7 @@ test(
await page.mouse.click(700, 200)
await expect(page.locator('.cm-content')).toHaveText(
`sketch001 = startSketchOn('XZ')`
`sketch001 = startSketchOn(XZ)`
)
// Wait for camera animation
@ -606,7 +606,7 @@ test(
await page.mouse.click(700, 200)
await expect(page.locator('.cm-content')).toHaveText(
`sketch001 = startSketchOn('XZ')`
`sketch001 = startSketchOn(XZ)`
)
// Wait for camera animation
@ -628,7 +628,7 @@ test(
mask: [page.getByTestId('model-state-indicator')],
})
await expect(page.locator('.cm-content')).toHaveText(
`sketch001 = startSketchOn('XZ')profile001 = circle(sketch001, center = [14.44, -2.44], radius = 1)`
`sketch001 = startSketchOn(XZ)profile001 = circle(sketch001, center = [14.44, -2.44], radius = 1)`
)
}
)
@ -657,7 +657,7 @@ test.describe(
// select a plane
await page.mouse.click(700, 200)
let code = `sketch001 = startSketchOn('XZ')`
let code = `sketch001 = startSketchOn(XZ)`
await expect(page.locator('.cm-content')).toHaveText(code)
// Wait for camera animation
@ -752,7 +752,7 @@ test.describe(
// select a plane
await page.mouse.click(700, 200)
let code = `sketch001 = startSketchOn('XZ')`
let code = `sketch001 = startSketchOn(XZ)`
await expect(u.codeLocator).toHaveText(code)
// Wait for camera animation
@ -823,7 +823,7 @@ test(
await context.addInitScript(async (KCL_DEFAULT_LENGTH) => {
localStorage.setItem(
'persistCode',
`part001 = startSketchOn('-XZ')
`part001 = startSketchOn(-XZ)
|> startProfileAt([1.4, 2.47], %)
|> line(end = [9.31, 10.55], tag = $seg01)
|> line(end = [11.91, -10.42])
@ -885,7 +885,7 @@ test(
await context.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`part001 = startSketchOn('XY')
`part001 = startSketchOn(XY)
|> startProfileAt([-10, -10], %)
|> line(end = [20, 0])
|> line(end = [0, 20])
@ -925,7 +925,7 @@ test(
await context.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`part001 = startSketchOn('XY')
`part001 = startSketchOn(XY)
|> startProfileAt([-10, -10], %)
|> line(end = [20, 0])
|> line(end = [0, 20])
@ -1104,7 +1104,7 @@ test('theme persists', async ({ page, context }) => {
await context.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`part001 = startSketchOn('XY')
`part001 = startSketchOn(XY)
|> startProfileAt([-10, -10], %)
|> line(end = [20, 0])
|> line(end = [0, 20])
@ -1174,7 +1174,7 @@ test.describe('code color goober', { tag: '@snapshot' }, () => {
`// Create a pipe using a sweep.
// Create a path for the sweep.
sweepPath = startSketchOn('XZ')
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
@ -1182,7 +1182,7 @@ sweepPath = startSketchOn('XZ')
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> line(end = [0, 7])
sweepSketch = startSketchOn('XY')
sweepSketch = startSketchOn(XY)
|> startProfileAt([2, 0], %)
|> arc({
angleEnd = 360,
@ -1224,7 +1224,7 @@ sweepSketch = startSketchOn('XY')
`// Create a pipe using a sweep.
// Create a path for the sweep.
sweepPath = startSketchOn('XZ')
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
@ -1232,7 +1232,7 @@ sweepPath = startSketchOn('XZ')
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> line(end = [0, 7])
sweepSketch = startSketchOn('XY')
sweepSketch = startSketchOn(XY)
|> startProfileAt([2, 0], %)
|> arc({
angleEnd = 360,