sketch dies on exit XY sketch (#2397)
* sketch dies on exit XY sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * fix test * fix test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1013,6 +1013,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => {
|
|||||||
// wait for execution done
|
// wait for execution done
|
||||||
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||||
|
await u.updateCamPosition([0, -1378.01, 0.06])
|
||||||
await u.closeDebugPanel()
|
await u.closeDebugPanel()
|
||||||
|
|
||||||
// select a line
|
// select a line
|
||||||
@ -1244,6 +1245,7 @@ test('Can add multiple sketches', async ({ page }) => {
|
|||||||
await u.clearCommandLogs()
|
await u.clearCommandLogs()
|
||||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||||
await page.waitForTimeout(400)
|
await page.waitForTimeout(400)
|
||||||
|
await u.updateCamPosition([583, 2000, 370])
|
||||||
await page.mouse.click(650, 450)
|
await page.mouse.click(650, 450)
|
||||||
|
|
||||||
await page.waitForTimeout(500) // TODO detect animation ending, or disable animation
|
await page.waitForTimeout(500) // TODO detect animation ending, or disable animation
|
||||||
@ -1257,8 +1259,7 @@ test('Can add multiple sketches', async ({ page }) => {
|
|||||||
|
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
||||||
const startAt2 =
|
const startAt2 = '[22.65, -30.57]'
|
||||||
process.platform === 'darwin' ? '[9.75, -13.16]' : '[0.93, -1.25]'
|
|
||||||
await expect(
|
await expect(
|
||||||
(await page.locator('.cm-content').innerText()).replace(/\s/g, '')
|
(await page.locator('.cm-content').innerText()).replace(/\s/g, '')
|
||||||
).toBe(
|
).toBe(
|
||||||
@ -1272,7 +1273,7 @@ const part002 = startSketchOn('${plane}')
|
|||||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
const num2 = process.platform === 'darwin' ? 9.84 : 0.94
|
const num2 = 22.87
|
||||||
await expect(
|
await expect(
|
||||||
(await page.locator('.cm-content').innerText()).replace(/\s/g, '')
|
(await page.locator('.cm-content').innerText()).replace(/\s/g, '')
|
||||||
).toBe(
|
).toBe(
|
||||||
@ -1290,9 +1291,7 @@ const part002 = startSketchOn('${plane}')
|
|||||||
const part002 = startSketchOn('${plane}')
|
const part002 = startSketchOn('${plane}')
|
||||||
|> startProfileAt(${startAt2}, %)
|
|> startProfileAt(${startAt2}, %)
|
||||||
|> line([${num2}, 0], %)
|
|> line([${num2}, 0], %)
|
||||||
|> line([0, ${roundOff(
|
|> line([0, ${roundOff(num2)}], %)`.replace(/\s/g, '')
|
||||||
num2 + (process.platform === 'darwin' ? 0.01 : -0.01)
|
|
||||||
)}], %)`.replace(/\s/g, '')
|
|
||||||
)
|
)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await page.mouse.click(startXPx, 500 - PUR * 20)
|
await page.mouse.click(startXPx, 500 - PUR * 20)
|
||||||
@ -1303,13 +1302,8 @@ const part002 = startSketchOn('${plane}')
|
|||||||
const part002 = startSketchOn('${plane}')
|
const part002 = startSketchOn('${plane}')
|
||||||
|> startProfileAt(${startAt2}, %)
|
|> startProfileAt(${startAt2}, %)
|
||||||
|> line([${num2}, 0], %)
|
|> line([${num2}, 0], %)
|
||||||
|> line([0, ${roundOff(
|
|> line([0, ${roundOff(num2)}], %)
|
||||||
num2 + (process.platform === 'darwin' ? 0.01 : -0.01)
|
|> line([-45.52, 0], %)`.replace(/\s/g, '')
|
||||||
)}], %)
|
|
||||||
|> line([-${process.platform === 'darwin' ? 19.59 : 1.87}, 0], %)`.replace(
|
|
||||||
/\s/g,
|
|
||||||
''
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 38 KiB |
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 40 KiB |
@ -890,7 +890,6 @@ export const modelingMachine = createMachine(
|
|||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
// there doesn't appear to be an animation, but if there was one we could add a wait here
|
// there doesn't appear to be an animation, but if there was one we could add a wait here
|
||||||
|
|
||||||
await engineCommandManager.sendSceneCommand({
|
await engineCommandManager.sendSceneCommand({
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
cmd_id: uuidv4(),
|
cmd_id: uuidv4(),
|
||||||
@ -899,23 +898,6 @@ export const modelingMachine = createMachine(
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||||
await engineCommandManager.sendSceneCommand({
|
|
||||||
type: 'modeling_cmd_req',
|
|
||||||
cmd_id: uuidv4(),
|
|
||||||
cmd: {
|
|
||||||
type: 'default_camera_set_perspective',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
await engineCommandManager.sendSceneCommand({
|
|
||||||
type: 'modeling_cmd_req',
|
|
||||||
cmd_id: uuidv4(),
|
|
||||||
cmd: {
|
|
||||||
type: 'default_camera_look_at',
|
|
||||||
center: { x: 0, y: 0, z: 0 },
|
|
||||||
vantage: sceneInfra.camControls.camera.position,
|
|
||||||
up: { x: 0, y: 0, z: 1 },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
await engineCommandManager.sendSceneCommand({
|
await engineCommandManager.sendSceneCommand({
|
||||||
// CameraControls subscribes to default_camera_get_settings response events
|
// CameraControls subscribes to default_camera_get_settings response events
|
||||||
// firing this at connection ensure the camera's are synced initially
|
// firing this at connection ensure the camera's are synced initially
|
||||||
|
Reference in New Issue
Block a user