diff --git a/e2e/playwright/flow-tests.spec.ts b/e2e/playwright/flow-tests.spec.ts index 2a8d3c92e..acd57f176 100644 --- a/e2e/playwright/flow-tests.spec.ts +++ b/e2e/playwright/flow-tests.spec.ts @@ -4,8 +4,6 @@ import { EngineCommand } from '../../src/lang/std/engineConnection' import { v4 as uuidv4 } from 'uuid' import { getUtils } from './test-utils' import waitOn from 'wait-on' -import { Models } from '@kittycad/lib' -import fsp from 'fs/promises' /* debug helper: unfortunately we do rely on exact coord mouse clicks in a few places @@ -86,26 +84,26 @@ test('Basic sketch', async ({ page }) => { await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) - const startAt = '[10.97, -14.79]' - const tenish = '11.07' + const startAt = '[18.26, -24.63]' + const num = '18.43' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %)`) + |> line([${num}, 0], %)`) await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %) - |> line([0, ${tenish}], %)`) + |> line([${num}, 0], %) + |> line([0, ${num}], %)`) await page.mouse.click(startXPx, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %) - |> line([0, ${tenish}], %) - |> line([-22.04, 0], %)`) + |> line([${num}, 0], %) + |> line([0, ${num}], %) + |> line([-36.69, 0], %)`) // deselect line tool await u.doAndWaitForCmd( @@ -133,8 +131,8 @@ test('Basic sketch', async ({ page }) => { await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line({ to: [${tenish}, 0], tag: 'seg01' }, %) - |> line([0, ${tenish}], %) + |> line({ to: [${num}, 0], tag: 'seg01' }, %) + |> line([0, ${num}], %) |> angledLine([180, segLen('seg01', %)], %)`) }) @@ -508,27 +506,27 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) - const startAt = '[10.97, -14.79]' - const tenish = '11.07' - const twentyish = '22.04' + const startAt = '[18.26, -24.63]' + const num = '18.43' + const num2 = '36.69' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %)`) + |> line([${num}, 0], %)`) await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %) - |> line([0, ${tenish}], %)`) + |> line([${num}, 0], %) + |> line([0, ${num}], %)`) await page.mouse.click(startXPx, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) - |> line([${tenish}, 0], %) - |> line([0, ${tenish}], %) - |> line([-${twentyish}, 0], %)`) + |> line([${num}, 0], %) + |> line([0, ${num}], %) + |> line([-${num2}, 0], %)`) // deselect line tool await u.doAndWaitForCmd( @@ -581,7 +579,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { // check the same selection again by putting cursor in code first then selecting axis await u.doAndWaitForCmd( - () => page.getByText(` |> line([-${twentyish}, 0], %)`).click(), + () => page.getByText(` |> line([-${num2}, 0], %)`).click(), 'select_clear', false ) @@ -596,7 +594,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { // select segment in editor than another segment in scene and check there are two cursors await u.doAndWaitForCmd( - () => page.getByText(` |> line([-${twentyish}, 0], %)`).click(), + () => page.getByText(` |> line([-${num2}, 0], %)`).click(), 'select_clear', false ) diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index f8bae3b77..16f0be099 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -45,7 +45,7 @@ test('change camera, show planes', async ({ page, context }) => { type: 'default_camera_look_at', center: { x: 0, y: 0, z: 0 }, up: { x: 0, y: 0, z: 1 }, - vantage: { x: 0, y: 50, z: 50 }, + vantage: { x: 0, y: 85, z: 85 }, }, } diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png index 2e183d3a0..d693b74b4 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png index 55ef9eb5d..43ee467ca 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png index 17ee75e64..9fd5080b0 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png differ diff --git a/src/lang/std/engineConnection.ts b/src/lang/std/engineConnection.ts index a18ec42bb..a39819009 100644 --- a/src/lang/std/engineConnection.ts +++ b/src/lang/std/engineConnection.ts @@ -1216,7 +1216,7 @@ export class EngineCommandManager { type: 'modeling_cmd_req', cmd: { type: 'make_plane', - size: 60, + size: 100, origin: { x: 0, y: 0, z: 0 }, x_axis, y_axis,