diff --git a/e2e/playwright/named-views.spec.ts-snapshots/verify-named-view-gets-created.toml b/e2e/playwright/named-views.spec.ts-snapshots/verify-named-view-gets-created.toml index 04d37214a11..bf49fd165c5 100644 --- a/e2e/playwright/named-views.spec.ts-snapshots/verify-named-view-gets-created.toml +++ b/e2e/playwright/named-views.spec.ts-snapshots/verify-named-view-gets-created.toml @@ -5,12 +5,12 @@ command_bar = { } [settings.app.named_views.0656fb1a-9640-473e-b334-591dc70c0138] name = "uuid1" -eye_offset = 1_378.0059 +eye_offset = 20.907705 fov_y = 45 is_ortho = false ortho_scale_enabled = true ortho_scale_factor = 1.6 pivot_position = [ 0, 0, 0 ] -pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ] +pivot_rotation = [ 0.4247082, 0.17591989, 0.33985114, 0.82047325 ] world_coord_system = "right_handed_up_z" version = 1 diff --git a/e2e/playwright/named-views.spec.ts-snapshots/verify-two-named-view-gets-created.toml b/e2e/playwright/named-views.spec.ts-snapshots/verify-two-named-view-gets-created.toml index 5723b4ac974..0ef3292ea9f 100644 --- a/e2e/playwright/named-views.spec.ts-snapshots/verify-two-named-view-gets-created.toml +++ b/e2e/playwright/named-views.spec.ts-snapshots/verify-two-named-view-gets-created.toml @@ -5,13 +5,13 @@ command_bar = { } [settings.app.named_views.0656fb1a-9640-473e-b334-591dc70c0138] name = "uuid1" -eye_offset = 1_378.0059 +eye_offset = 20.907705 fov_y = 45 is_ortho = false ortho_scale_enabled = true ortho_scale_factor = 1.6 pivot_position = [ 0, 0, 0 ] -pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ] +pivot_rotation = [ 0.4247082, 0.17591989, 0.33985114, 0.82047325 ] world_coord_system = "right_handed_up_z" version = 1 diff --git a/e2e/playwright/regression-tests.spec.ts b/e2e/playwright/regression-tests.spec.ts index b59f1523d02..fa1dcab4d3e 100644 --- a/e2e/playwright/regression-tests.spec.ts +++ b/e2e/playwright/regression-tests.spec.ts @@ -339,8 +339,8 @@ extrude002 = extrude(profile002, length = 150)` // expect pixel color to be background color const offModelBefore = await scene.convertPagePositionToStream( + 0.1, 0.9, - 0.5, 'ratio' ) const onModelBefore = await scene.convertPagePositionToStream( @@ -590,8 +590,8 @@ extrude002 = extrude(profile002, length = 150)` const u = await getUtils(page) // Constants and locators - const planeColor: [number, number, number] = [170, 220, 170] - const bgColor: [number, number, number] = TEST_COLORS.DARK_MODE_BKGD + const planeColor: [number, number, number] = [80, 60, 60] + const bgColor: [number, number, number] = [30, 30, 30] const middlePixelIsColor = async (color: [number, number, number]) => { return u.getGreatestPixDiff({ x: 600, y: 250 }, color) } diff --git a/e2e/playwright/sketch-tests.spec.ts b/e2e/playwright/sketch-tests.spec.ts index e57d16f5c7a..c3f193976a2 100644 --- a/e2e/playwright/sketch-tests.spec.ts +++ b/e2e/playwright/sketch-tests.spec.ts @@ -2248,10 +2248,10 @@ extrude001 = extrude(profile003, length = 5) await homePage.goToModelingScene() await scene.settled(cmdBar) - const [selectXZPlane] = scene.makeMouseHelpers(650, 150) - + await toolbar.openFeatureTreePane() await toolbar.startSketchPlaneSelection() - await selectXZPlane() + await page.getByRole('button', { name: 'Front plane' }).click() + // timeout wait for engine animation is unavoidable await page.waitForTimeout(600) @@ -2274,8 +2274,10 @@ extrude001 = extrude(profile003, length = 5) await editor.closePane() await scene.settled(cmdBar) - - await scene.expectPixelColor([255, 255, 255], { x: 633, y: 211 }, 15) + await toolbar.openFeatureTreePane() + await expect( + await toolbar.getFeatureTreeOperation('Sketch', 0) + ).toBeVisible() }) }) test('A sketch with only "startProfileAt" and no segments should still be able to be continued', async ({ @@ -2558,7 +2560,7 @@ loft([profile001, profile002]) ) }) - await page.setBodyDimensions({ width: 1000, height: 500 }) + await page.setBodyDimensions({ width: 1200, height: 800 }) await homePage.goToModelingScene() await scene.settled(cmdBar) diff --git a/e2e/playwright/snap-to-grid.spec.ts b/e2e/playwright/snap-to-grid.spec.ts index 4674bb17775..a3377758aed 100644 --- a/e2e/playwright/snap-to-grid.spec.ts +++ b/e2e/playwright/snap-to-grid.spec.ts @@ -37,6 +37,6 @@ test.describe('Snap to Grid', () => { await clickB() // Check if snapping is working - await editor.expectEditor.toContain('line(end = [10, 7.5])') + await editor.expectEditor.toContain('line(end = [0.15, 0.1])') }) }) diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index ab609addc9b..a41691bf691 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -128,7 +128,7 @@ test.describe( test( 'Draft rectangles should look right', { tag: '@snapshot' }, - async ({ page }) => { + async ({ page, toolbar, editor }) => { const u = await getUtils(page) await page.setViewportSize({ width: 1200, height: 500 }) await u.waitForAuthSkipAppStart() @@ -140,10 +140,10 @@ test( ) // Select a plane - await page.mouse.click(700, 200) - await expect(page.locator('.cm-content')).toHaveText( - `sketch001 = startSketchOn(XZ)` - ) + await toolbar.openFeatureTreePane() + await page.getByRole('button', { name: 'Front plane' }).click() + await toolbar.closeFeatureTreePane() + await editor.expectEditor.toContain(`sketch001 = startSketchOn(XZ)`) // Equip the rectangle tool await page.getByTestId('corner-rectangle').click() diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png index 21a500f3d99..646939eda9c 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png index 0137d174fc7..e7f2c0b7b41 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-to-on-via-command-bar-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-to-on-via-command-bar-1-Google-Chrome-linux.png index abbc64c2a99..9fa501a9993 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-to-on-via-command-bar-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-to-on-via-command-bar-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/test-network-and-connection-issues.spec.ts b/e2e/playwright/test-network-and-connection-issues.spec.ts index 52ae4dd4a25..6c416b7b430 100644 --- a/e2e/playwright/test-network-and-connection-issues.spec.ts +++ b/e2e/playwright/test-network-and-connection-issues.spec.ts @@ -109,7 +109,9 @@ test.describe('Test network related behaviors', () => { await page.waitForTimeout(100) // select a plane - await page.mouse.click(700, 200) + await toolbar.openFeatureTreePane() + await page.getByRole('button', { name: 'Front plane' }).click() + await toolbar.closeFeatureTreePane() await expect(page.locator('.cm-content')).toHaveText( `@settings(defaultLengthUnit = in)sketch001 = startSketchOn(XZ)` diff --git a/e2e/playwright/testing-selections.spec.ts b/e2e/playwright/testing-selections.spec.ts index 8f36b969a54..7daabaceac4 100644 --- a/e2e/playwright/testing-selections.spec.ts +++ b/e2e/playwright/testing-selections.spec.ts @@ -307,6 +307,7 @@ profile001 = startProfile(sketch001, at = [7.49, 9.96]) test('Deselecting line tool should mean nothing happens on click', async ({ page, homePage, + toolbar, }) => { /** * If the line tool is clicked when the state is 'No Points' it will exit Sketch mode. @@ -334,8 +335,10 @@ profile001 = startProfile(sketch001, at = [7.49, 9.96]) 200 ) - // Clicks the XZ Plane in the page - await page.mouse.click(700, 200) + // Clicks the XZ Plane + await toolbar.openFeatureTreePane() + await page.getByRole('button', { name: 'Front plane' }).click() + await toolbar.closeFeatureTreePane() await expect(page.locator('.cm-content')).toHaveText( `@settings(defaultLengthUnit = in)sketch001 = startSketchOn(XZ)` diff --git a/e2e/playwright/testing-settings.spec.ts b/e2e/playwright/testing-settings.spec.ts index 21e6e076fdc..ef89e64e515 100644 --- a/e2e/playwright/testing-settings.spec.ts +++ b/e2e/playwright/testing-settings.spec.ts @@ -15,7 +15,6 @@ import { TEST_SETTINGS_KEY, } from '@e2e/playwright/storageStates' import { - TEST_COLORS, createProject, executorInputPath, getUtils, @@ -973,8 +972,8 @@ test.describe( // Selectors and constants const darkBackgroundCss = 'oklch(0.3012 0 264.5)' const lightBackgroundCss = 'oklch(0.9911 0 264.5)' - const darkBackgroundColor = TEST_COLORS.DARK_MODE_BKGD - const lightBackgroundColor: [number, number, number] = [245, 245, 245] + const darkBackgroundColor: [number, number, number] = [87, 67, 107] // planes are on + const lightBackgroundColor: [number, number, number] = [166, 149, 184] // planes are on const streamBackgroundPixelIsColor = async ( color: [number, number, number] ) => { diff --git a/public/kcl-samples/screenshots/teapot.png b/public/kcl-samples/screenshots/teapot.png index 444c205e26c..35cb1c97251 100644 Binary files a/public/kcl-samples/screenshots/teapot.png and b/public/kcl-samples/screenshots/teapot.png differ diff --git a/rust/kcl-lib/e2e/executor/cache.rs b/rust/kcl-lib/e2e/executor/cache.rs index 438643f62a6..731cbc8474e 100644 --- a/rust/kcl-lib/e2e/executor/cache.rs +++ b/rust/kcl-lib/e2e/executor/cache.rs @@ -528,7 +528,7 @@ extrude(profile001, length = 100) ); let result = cache_test( - "multi_file_after_empty", + "multi_file_after_empty_with_woo", vec![ Variation { code: "", diff --git a/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_1.png b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_1.png index 8224373438f..e9097f93efc 100644 Binary files a/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_1.png and b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_1.png differ diff --git a/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_0.png b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_0.png new file mode 100644 index 00000000000..6148ae43278 Binary files /dev/null and b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_0.png differ diff --git a/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_1.png b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_1.png new file mode 100644 index 00000000000..e9097f93efc Binary files /dev/null and b/rust/kcl-lib/e2e/executor/outputs/cache_multi_file_after_empty_with_woo_1.png differ diff --git a/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/rendered_model.png b/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/rendered_model.png index ca70b800f7b..13f3090c87d 100644 Binary files a/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/rendered_model.png and b/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/rendered_model.png differ diff --git a/rust/kcl-lib/tests/kcl_samples/teapot/rendered_model.png b/rust/kcl-lib/tests/kcl_samples/teapot/rendered_model.png index 444c205e26c..35cb1c97251 100644 Binary files a/rust/kcl-lib/tests/kcl_samples/teapot/rendered_model.png and b/rust/kcl-lib/tests/kcl_samples/teapot/rendered_model.png differ diff --git a/rust/kcl-lib/tests/subtract_regression12/rendered_model.png b/rust/kcl-lib/tests/subtract_regression12/rendered_model.png index c541dac7c7a..5aae217e389 100644 Binary files a/rust/kcl-lib/tests/subtract_regression12/rendered_model.png and b/rust/kcl-lib/tests/subtract_regression12/rendered_model.png differ