Skip to content

Commit 9ae9116

Browse files
committed
Fix "Verify axis, origin, and horizontal snapping" by adding a relativeToStream flag
1 parent 83e3521 commit 9ae9116

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

e2e/playwright/fixtures/sceneFixture.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export class SceneFixture {
8585
convertPagePositionToStream = async (
8686
x: number,
8787
y: number,
88-
format: 'pixels' | 'ratio' | undefined = 'pixels'
88+
format: 'pixels' | 'ratio' | undefined = 'pixels',
89+
relativeToStream = false
8990
) => {
9091
const viewportSize = this.page.viewportSize()
9192
const streamBoundingBox = await this.streamWrapper.boundingBox()
@@ -99,11 +100,11 @@ export class SceneFixture {
99100
const resolvedX =
100101
(x / (format === 'pixels' ? viewportSize.width : 1)) *
101102
streamBoundingBox.width +
102-
streamBoundingBox.x
103+
(relativeToStream ? 0 : streamBoundingBox.x)
103104
const resolvedY =
104105
(y / (format === 'pixels' ? viewportSize.height : 1)) *
105106
streamBoundingBox.height +
106-
streamBoundingBox.y
107+
(relativeToStream ? 0 : streamBoundingBox.y)
107108

108109
const resolvedPoint = {
109110
x: Math.round(resolvedX),
@@ -203,12 +204,14 @@ export class SceneFixture {
203204
const resolvedToPoint = await this.convertPagePositionToStream(
204205
x,
205206
y,
206-
format
207+
format,
208+
true
207209
)
208210
const resolvedFromPoint = await this.convertPagePositionToStream(
209211
dragToParams.fromPoint.x,
210212
dragToParams.fromPoint.y,
211-
format
213+
format,
214+
true
212215
)
213216
if (debug) {
214217
console.log({
@@ -239,12 +242,14 @@ export class SceneFixture {
239242
const resolvedFromPoint = await this.convertPagePositionToStream(
240243
x,
241244
y,
242-
format
245+
format,
246+
true
243247
)
244248
const resolvedToPoint = await this.convertPagePositionToStream(
245249
dragFromParams.toPoint.x,
246250
dragFromParams.toPoint.y,
247-
format
251+
format,
252+
true
248253
)
249254
if (debug) {
250255
console.log({

e2e/playwright/point-click.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1874,7 +1874,6 @@ extrude001 = extrude(profile001, length = 5)
18741874
await test.step('Select edges and apply oversized fillet', async () => {
18751875
await test.step(`Select the edge`, async () => {
18761876
await toolbar.closePane('code')
1877-
await page.waitForTimeout(10000)
18781877
const [clickOnTheEdge] = scene.makeMouseHelpers(
18791878
edgeLocation.x,
18801879
edgeLocation.y

0 commit comments

Comments
 (0)