Skip to content

Commit 2681ffb

Browse files
franknoirotgithub-actions[bot]andrewvargapierremtbjacebrowning
authored
Restyle layout to not have panes overlay the stream (#7806)
* Make stream size based on container element, not window * Add a sixDot custom icon for a gripper * Restyle layout to not have panes overlay stream * Update snapshots * Follow-up styling tweaks * Attempt to fix sketch mode rendering, something's still weird * Update snapshots * Use `offsetX` and Y instead of `clientX` and Y for mouse * Update snapshots * use ResizeObserver for canvas resize * Tweak sidebar button styles to feel a bit nicer * Update snapshots * Try a quick fix of converting all page pixel coordinates to stream-relative ones at the fixture level Here's hoping! * Update snapshot tests * Update snapshots * Don't start sketch before editing existing sketch * Update "sketch on back sides" tests * Update snapshots * Update snapshots * Remove pixel color assertions from OBJ import test * Update click coordinates * Fix toolbar button badge position * Update moveNoWhere util to use canvas bbox * Remove pixel coords from switching file test * Fix imported geometry tests by closing panes * Remove coords from point-and-click assemblies tests * Remove "extrude circle" test as it's tested a dozen other ways * Remove 'can export from electron app' tests This is already tested in desktop-export.spec.ts * Remove coords from 'import from nested dir' test * Update coords on abs dist constraint tests * Remove pixel-based selection regression test This crash was made impossible here https://github.com/KittyCAD/modeling-app/pull/5644/files#diff-c6b22f670cc9d716d96d19445c8b6c0750f11ca917a386b7b03f5be7c6549e3f and selections have been fundamentally refactored since. * Fix two issues with stream coordinates in tests First was not making the new wrapper element overflow-hidden, so the toolbar would mess up coordinates. Second was to round the position to the nearest whole pixel, because the pixel color checks would break if not. * Update coords on stream resize test * Update snapshots * Remove pixel coords from 'nuke everything' sketch test * lint and tsc * Update pixel color check util to use transformed coords * Remove 'testing selections' tests that use pixel coords They appear to be old enough and tested well enough elsewhere to merit straight deletion. * Update `getGreatestPixDiff` to use relative coords * Remove funky little pane UI regression E2E test * Reset snapshots to main and let CI update them accordingly * Update snapshot test sketches to bias to origin instead of lower-right quadrant * Update snapshots * Update camera movement test expected position * Update the coordinates for this little regression test * Update utils and comments * Update coords in sketch on revolve face test * Fix import from nested directory test I thought this was working before though? * Update coordinates for `Shift-click to select and deselect edges and faces` * Update snapshots * Fix import from nested directory test I thought this was working before though? * Clear containerElementRef on engine connection stop * Update snapshots * Update project test to not use pixel coords * Update snapshots * Update snapshots * Improve project test after pixel coord removal * Close code pane before clicking scene in "Create boolean operation -- intersect" * Remove pixel coords from project switching "empty" test * Remove pixel coords from file switch test with error * Remove pixel coords from file switch test with empty file * Remove pixel coords from non-English char project name test * Refactor project colliding name test to not wait for scene * Remove coord-based (via KCL) check from persistence test * Remove implicit coords from dragging / snapping test * Update coords on double-click sketch test * Update coords in continue a profile test * Remove unnecessary timeouts I added * Try to fix drag helper to use stream-relative coords * Try to update coords in dragging test, still failing * Use fixture helper to fix Revolve point-and-click * Scroll to the bottom of code in boolean tests, text is lazy * Lint * Update coords for chamfer tests * Get rid of most uses of `getSegmentBodyCoords` in favor of `getBoundingBox` This fixes many of the tests for me locally. * Update coords in selection test * Remove fudge factor that is no longer necessary, so two seg test pass * Update coords and values for abs dist test set * Fix exit sketch test by closing code pane * Fix snap to close tests * Fix test name formatting * Try to fix up chamfer test on Linux * Remove undo with code pane test in favor of step in another test * Update snapshots * Update snapshots * Update coordinates for gizmo center on selection test * lints and fmts * Update snapshots * Update snapshots * Remove "basic-sketch" E2E tests After reviewing this test's contents I feel very confident removing them in favor of tests like "multi-profile sketching › Can add multiple profiles to a sketch (all tool types)" * Update snapshots * Remove unnecessary E2E test 1. test was written as part of this bug fix PR from last year: #2836 2. the logic added in that PR has since been heavily refactored and made a part of editorMachine 3. the hover-highlight and code pane selection mirroring behaviors are well-tested elsewhere, like here: https://github.com/KittyCAD/modeling-app/blob/main/e2e/playwright/testing-camera-movement.spec.ts#L363-L363 * Lint * Fix merge botch * Update snapshots * Remove absolute px scene checks in Fillet point-and-click delete * Update snapshots * Keep only one px coordinate for sweepEdge selection in Fillet with large radius should update code even if engine fails * Update snapshots * Remove redundant sketch test * Keep only one px coordinate for sweepEdge selection in Fillet point-and-click * Remove double setup step in Shift-click to select and deselect edges * Fix signature helper editor tests (#8006) Fix signature test; add makefile helper arg * Fix network test (#8009) * Fix "Verify axis, origin, and horizontal snapping" by adding a relativeToStream flag * Update "delete all profiles" test to not draw the initial sketch Tested against main, so this is eligible for a breakout PR if we want. Revealed a gotcha with sketch mode state after direct code modifications. * Remove need for absolute coordinates in "Can undo a sketch modification with ctrl+z" * Remove KCL and pixel-based checks from Snap to * tests * Remove unnecessary old "delete most of the sketch" E2E test I've reviewed this test and decided it is already covered by a combination of: 1. `e2e:desktop › sketch-tests.spec.ts › multi-profile sketching › can delete all profiles in sketch mode and user can still equip a tool and draw something` for the post-deletion behavior 2. `e2e:desktop › sketch-tests.spec.ts › multi-profile sketching › Can enter sketch loft edges, base and continue sketch` and others for the "sketch continuation" behavior * Update Angle constraint test to make axis selection work again * Update sketch profile in "remove constraints" E2E test This stemmed from our need to bias sketches over to the right because the left side of the sketch would be hidden beneath the code pane. Simply centering the sketch ensured that it was all in view at the start of entering sketch mode. * Remove absolute clicks in "Can delete a single segment line with keyboard" * Fix up my goofed RegExp strings in the Angle constraint tests Thanks ML code review tools! * Update coordinates in stream-code highlight test Most fragile test I've had so far I think. Made all the coordinates relative to the stream, but any camera tweaks will break this. * Restore original test name * Move to common util and fix "Can edit a tangentialArc defined by angle and radius" * Bad: replace logic on exit sketch button with timeout in "can delete all profiles in sketch mode and user can still equip a tool and draw something" * WIP can edit circle * WIP * Remove specific coordinate checks * Fix for good * Update "Existing sketch with bad code delete user's code" to use newer fixtures and ratios * Replace color checks with button checks for 'can enter sketch when there is an extrude' * Remove redundant hover highlight test * fix "Straight line snapping to previous tangent" * Remove explicit coordinates in "Can add multiple sketches" but still check against the initial intent * Remove `any` type from bbox helper * Trim down "edit extruded in pipe" test * Remove overlapping "revolve in pipe" sketch test the "extrude in pipe" test should cover this just fine * Update snapshots * Update snapshots * Remove absolute coords in "Can enter sketch loft edges, base and continue sketch" and move to newer utils * Make NUMBER_REGEXP match negative numbers * Update pipe splitting test to not test coordinates or KCL points * Fix "Can enter sketch on sketch of wall and cap for segment" and disable already dead cases * Remove unneeded click * Disable extra wall segment case --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andrew Varga <[email protected]> Co-authored-by: Pierre Jacquier <[email protected]> Co-authored-by: Jace Browning <[email protected]> Co-authored-by: Zookeeper Lee <[email protected]> Co-authored-by: Pierre Jacquier <[email protected]> Co-authored-by: max-mrgrsk <[email protected]>
1 parent 8ba24d7 commit 2681ffb

File tree

47 files changed

+636
-1895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+636
-1895
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ run-desktop: install build ## Start the desktop app
113113
###############################################################################
114114
# TEST
115115

116+
PW_ARGS ?=
117+
116118
E2E_GREP ?=
117119
E2E_WORKERS ?=
118120
E2E_FAILURES ?= 1
@@ -138,17 +140,17 @@ test-e2e: test-e2e-$(TARGET)
138140
.PHONY: test-e2e-web
139141
test-e2e-web: install build ## Run the web e2e tests
140142
ifdef E2E_GREP
141-
npm run test:e2e:web -- --headed --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
143+
npm run test:e2e:web -- --headed --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES) $(PW_ARGS)
142144
else
143-
npm run test:e2e:web -- --headed --workers='100%'
145+
npm run test:e2e:web -- --headed --workers='100%' $(PW_ARGS)
144146
endif
145147

146148
.PHONY: test-e2e-desktop
147149
test-e2e-desktop: install build ## Run the desktop e2e tests
148150
ifdef E2E_GREP
149-
npm run test:e2e:desktop -- --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
151+
npm run test:e2e:desktop -- --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES) $(PW_ARGS)
150152
else
151-
npm run test:e2e:desktop -- --workers='100%'
153+
npm run test:e2e:desktop -- --workers='100%' $(PW_ARGS)
152154
endif
153155

154156
.PHONY: test-snapshots

e2e/playwright/basic-sketch.spec.ts

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)