diff --git a/e2e/playwright/flow-tests.spec.ts b/e2e/playwright/flow-tests.spec.ts index 12423cc66..d518e295b 100644 --- a/e2e/playwright/flow-tests.spec.ts +++ b/e2e/playwright/flow-tests.spec.ts @@ -1013,6 +1013,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { // wait for execution done await u.expectCmdLog('[data-message-type="execution-done"]') + await u.updateCamPosition([0, -1378.01, 0.06]) await u.closeDebugPanel() // select a line @@ -1244,6 +1245,7 @@ test('Can add multiple sketches', async ({ page }) => { await u.clearCommandLogs() await page.getByRole('button', { name: 'Start Sketch' }).click() await page.waitForTimeout(400) + await u.updateCamPosition([583, 2000, 370]) await page.mouse.click(650, 450) 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.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) - const startAt2 = - process.platform === 'darwin' ? '[9.75, -13.16]' : '[0.93, -1.25]' + const startAt2 = '[22.65, -30.57]' await expect( (await page.locator('.cm-content').innerText()).replace(/\s/g, '') ).toBe( @@ -1272,7 +1273,7 @@ const part002 = startSketchOn('${plane}') await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) await page.waitForTimeout(100) - const num2 = process.platform === 'darwin' ? 9.84 : 0.94 + const num2 = 22.87 await expect( (await page.locator('.cm-content').innerText()).replace(/\s/g, '') ).toBe( @@ -1290,9 +1291,7 @@ const part002 = startSketchOn('${plane}') const part002 = startSketchOn('${plane}') |> startProfileAt(${startAt2}, %) |> line([${num2}, 0], %) - |> line([0, ${roundOff( - num2 + (process.platform === 'darwin' ? 0.01 : -0.01) - )}], %)`.replace(/\s/g, '') + |> line([0, ${roundOff(num2)}], %)`.replace(/\s/g, '') ) await page.waitForTimeout(100) await page.mouse.click(startXPx, 500 - PUR * 20) @@ -1303,13 +1302,8 @@ const part002 = startSketchOn('${plane}') const part002 = startSketchOn('${plane}') |> startProfileAt(${startAt2}, %) |> line([${num2}, 0], %) - |> line([0, ${roundOff( - num2 + (process.platform === 'darwin' ? 0.01 : -0.01) - )}], %) - |> line([-${process.platform === 'darwin' ? 19.59 : 1.87}, 0], %)`.replace( - /\s/g, - '' - ) + |> line([0, ${roundOff(num2)}], %) + |> line([-45.52, 0], %)`.replace(/\s/g, '') ) }) diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png index 54b54272e..17cd2dd23 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png index 7ac401a94..12f6c5506 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png differ diff --git a/src/machines/modelingMachine.ts b/src/machines/modelingMachine.ts index 1569349df..1e6e838c6 100644 --- a/src/machines/modelingMachine.ts +++ b/src/machines/modelingMachine.ts @@ -890,7 +890,6 @@ export const modelingMachine = createMachine( }) .then(async () => { // there doesn't appear to be an animation, but if there was one we could add a wait here - await engineCommandManager.sendSceneCommand({ type: 'modeling_cmd_req', cmd_id: uuidv4(), @@ -899,23 +898,6 @@ export const modelingMachine = createMachine( }, }) 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({ // CameraControls subscribes to default_camera_get_settings response events // firing this at connection ensure the camera's are synced initially