|  |  | @ -27,6 +27,8 @@ document.addEventListener('mousemove', (e) => | 
			
		
	
		
		
			
				
					
					|  |  |  | ) |  |  |  | ) | 
			
		
	
		
		
			
				
					
					|  |  |  | */ |  |  |  | */ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | const deg = (Math.PI * 2) / 360 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const commonPoints = { |  |  |  | const commonPoints = { | 
			
		
	
		
		
			
				
					
					|  |  |  |   startAt: '[9.06, -12.22]', |  |  |  |   startAt: '[9.06, -12.22]', | 
			
		
	
		
		
			
				
					
					|  |  |  |   num1: 9.14, |  |  |  |   num1: 9.14, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -656,6 +658,7 @@ test('re-executes', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   ).toBeVisible() |  |  |  |   ).toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | test.describe('Can create sketches on all planes and their back sides', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const sketchOnPlaneAndBackSideTest = async ( |  |  |  |   const sketchOnPlaneAndBackSideTest = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     page: any, |  |  |  |     page: any, | 
			
		
	
		
		
			
				
					
					|  |  |  |     plane: string, |  |  |  |     plane: string, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -722,8 +725,6 @@ const sketchOnPlaneAndBackSideTest = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.clearCommandLogs() |  |  |  |     await u.clearCommandLogs() | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.removeCurrentCode() |  |  |  |     await u.removeCurrentCode() | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | test.describe('Can create sketches on all planes and their back sides', () => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   test('XY', async ({ page }) => { |  |  |  |   test('XY', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     await sketchOnPlaneAndBackSideTest( |  |  |  |     await sketchOnPlaneAndBackSideTest( | 
			
		
	
		
		
			
				
					
					|  |  |  |       page, |  |  |  |       page, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -1484,12 +1485,15 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  | test('Can add multiple sketches', async ({ page }) => { |  |  |  | test('Can add multiple sketches', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   test.skip(process.platform === 'darwin', 'Can add multiple sketches') |  |  |  |   test.skip(process.platform === 'darwin', 'Can add multiple sketches') | 
			
		
	
		
		
			
				
					
					|  |  |  |   const u = await getUtils(page) |  |  |  |   const u = await getUtils(page) | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.setViewportSize({ width: 1200, height: 500 }) |  |  |  |   const viewportSize = { width: 1200, height: 500 } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   const PUR = 400 / 37.5 //pixeltoUnitRatio |  |  |  |   await page.setViewportSize(viewportSize) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   await page.goto('/') |  |  |  |   await page.goto('/') | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.waitForAuthSkipAppStart() |  |  |  |   await u.waitForAuthSkipAppStart() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.openDebugPanel() |  |  |  |   await u.openDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const center = { x: viewportSize.width / 2, y: viewportSize.height / 2 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   u.click00rSetCenter(center.x, center.y) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect( |  |  |  |   await expect( | 
			
		
	
		
		
			
				
					
					|  |  |  |     page.getByRole('button', { name: 'Start Sketch' }) |  |  |  |     page.getByRole('button', { name: 'Start Sketch' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |   ).not.toBeDisabled() |  |  |  |   ).not.toBeDisabled() | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -1502,127 +1506,71 @@ test('Can add multiple sketches', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     200 |  |  |  |     200 | 
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |   ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // select a plane |  |  |  |   let codeStr = "const part001 = startSketchOn('XY')" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(700, 200) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.locator('.cm-content')).toHaveText( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     `const part001 = startSketchOn('XZ')` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await page.mouse.click(center.x, viewportSize.height * 0.55) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.closeDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(500) // TODO detect animation ending, or disable animation |  |  |  |   await page.waitForTimeout(500) // TODO detect animation ending, or disable animation | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const startXPx = 600 |  |  |  |   await u.click00r(0, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await u.closeDebugPanel() |  |  |  |   codeStr += `  |> startProfileAt(${u.toSU([0, 0])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.locator('.cm-content')) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     .toHaveText(`const part001 = startSketchOn('XZ') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${commonPoints.startAt}, %)`) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) |  |  |  |   await u.click00r(50, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |   codeStr += `  |> line(${u.toSU([50, 0])}, %)` | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.locator('.cm-content')) |  |  |  |   await u.click00r(0, 50) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     .toHaveText(`const part001 = startSketchOn('XZ') |  |  |  |   codeStr += `  |> line(${u.toSU([0, 50])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${commonPoints.startAt}, %) |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([${commonPoints.num1}, 0], %)`) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20) |  |  |  |   await u.click00r(-50, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.locator('.cm-content')) |  |  |  |   codeStr += `  |> line(${u.toSU([-50, 0])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     .toHaveText(`const part001 = startSketchOn('XZ') |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${commonPoints.startAt}, %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([${commonPoints.num1}, 0], %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([0, ${commonPoints.num1}], %)`) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx, 500 - PUR * 20) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const finalCodeFirstSketch = `const part001 = startSketchOn('XZ') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${commonPoints.startAt}, %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([${commonPoints.num1}, 0], %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([0, ${commonPoints.num1}], %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([-${commonPoints.num2}, 0], %)` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.locator('.cm-content')).toHaveText(finalCodeFirstSketch) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // exit the sketch |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // exit the sketch, reset relative clicker | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.click00r(undefined, undefined) | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.openAndClearDebugPanel() |  |  |  |   await u.openAndClearDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.getByRole('button', { name: 'Exit Sketch' }).click() |  |  |  |   await page.getByRole('button', { name: 'Exit Sketch' }).click() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.expectCmdLog('[data-message-type="execution-done"]') |  |  |  |   await u.expectCmdLog('[data-message-type="execution-done"]') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.updateCamPosition([100, 100, 100]) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(250) |  |  |  |   await page.waitForTimeout(250) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.clearCommandLogs() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // start a new sketch |  |  |  |   // start a new sketch | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.clearCommandLogs() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.getByRole('button', { name: 'Start Sketch' }).click() |  |  |  |   await page.getByRole('button', { name: 'Start Sketch' }).click() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(400) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(650, 450) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // when exiting the sketch above the camera is still looking down at XY, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // so selecting the plane again is a bit easier. | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await page.mouse.click(center.x + 30, center.y) | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(500) // TODO detect animation ending, or disable animation |  |  |  |   await page.waitForTimeout(500) // TODO detect animation ending, or disable animation | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.clearAndCloseDebugPanel() |  |  |  |   codeStr += "const part002 = startSketchOn('XY')" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   // on mock os there are issues with getting the camera to update |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // it should not be selecting the 'XZ' plane here if the camera updated |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // properly, but if we just role with it we can still verify everything |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // in the rest of the test |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const plane = process.platform === 'darwin' ? 'XZ' : 'XY' |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   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]' |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     (await page.locator('.cm-content').innerText()).replace(/\s/g, '') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   ).toBe( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     `${finalCodeFirstSketch} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const part002 = startSketchOn('${plane}') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${startAt2}, %)`.replace(/\s/g, '') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   await u.closeDebugPanel() |  |  |  |   await u.closeDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const num2 = process.platform === 'darwin' ? 9.84 : 0.94 |  |  |  |   await u.click00r(30, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await expect( |  |  |  |   codeStr += `  |> startProfileAt(${u.toSU([30, 0])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     (await page.locator('.cm-content').innerText()).replace(/\s/g, '') |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   ).toBe( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     `${finalCodeFirstSketch} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const part002 = startSketchOn('${plane}') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${startAt2}, %) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([${num2}, 0], %)`.replace(/\s/g, '') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20) |  |  |  |   await u.click00r(30, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await expect( |  |  |  |   codeStr += `  |> line(${u.toSU([30 - 0.1 /* imprecision */, 0])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     (await page.locator('.cm-content').innerText()).replace(/\s/g, '') |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   ).toBe( |  |  |  |  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     `${finalCodeFirstSketch} |  |  |  |   await u.click00r(0, 30) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | const part002 = startSketchOn('${plane}') |  |  |  |   codeStr += `  |> line(${u.toSU([0, 30])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> startProfileAt(${startAt2}, %) |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([${num2}, 0], %) |  |  |  |  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> line([0, ${roundOff( |  |  |  |   await u.click00r(-30, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     num2 + (process.platform === 'darwin' ? 0.01 : -0.01) |  |  |  |   codeStr += `  |> line(${u.toSU([-30 + 0.1, 0])}, %)` | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   )}], %)`.replace(/\s/g, '') |  |  |  |   await u.expectCodeToBe(codeStr) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await page.waitForTimeout(100) |  |  |  |   await u.click00r(undefined, undefined) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await page.mouse.click(startXPx, 500 - PUR * 20) |  |  |  |   await u.openAndClearDebugPanel() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   await expect( |  |  |  |   await page.getByRole('button', { name: 'Exit Sketch' }).click() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     (await page.locator('.cm-content').innerText()).replace(/\s/g, '') |  |  |  |   await u.expectCmdLog('[data-message-type="execution-done"]') | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   ).toBe( |  |  |  |   await u.updateCamPosition([100, 100, 100]) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     `${finalCodeFirstSketch} |  |  |  |   await page.waitForTimeout(250) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | const part002 = startSketchOn('${plane}') |  |  |  |   await u.clearCommandLogs() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   |> 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, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       '' |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     ) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | test('ProgramMemory can be serialised', async ({ page }) => { |  |  |  | test('ProgramMemory can be serialised', async ({ page }) => { | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2105,6 +2053,7 @@ test('Can edit segments by dragging their handles', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   |> tangentialArcTo([26.92, -3.32], %)`) |  |  |  |   |> tangentialArcTo([26.92, -3.32], %)`) | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | test.describe('Snap to close works (at any scale)', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const doSnapAtDifferentScales = async ( |  |  |  |   const doSnapAtDifferentScales = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     page: any, |  |  |  |     page: any, | 
			
		
	
		
		
			
				
					
					|  |  |  |     camPos: [number, number, number], |  |  |  |     camPos: [number, number, number], | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2127,7 +2076,9 @@ const doSnapAtDifferentScales = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     await expect( |  |  |  |     await expect( | 
			
		
	
		
		
			
				
					
					|  |  |  |       page.getByRole('button', { name: 'Start Sketch' }) |  |  |  |       page.getByRole('button', { name: 'Start Sketch' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     ).not.toBeDisabled() |  |  |  |     ).not.toBeDisabled() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible() |  |  |  |     await expect( | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       page.getByRole('button', { name: 'Start Sketch' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     ).toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.clearCommandLogs() |  |  |  |     await u.clearCommandLogs() | 
			
		
	
		
		
			
				
					
					|  |  |  |     await page.getByRole('button', { name: 'Start Sketch' }).click() |  |  |  |     await page.getByRole('button', { name: 'Start Sketch' }).click() | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2175,10 +2126,9 @@ const doSnapAtDifferentScales = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     await expect(page.locator('.cm-content')).toHaveText(code) |  |  |  |     await expect(page.locator('.cm-content')).toHaveText(code) | 
			
		
	
		
		
			
				
					
					|  |  |  |     // Assert the tool was unequipped |  |  |  |     // Assert the tool was unequipped | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.getByRole('button', { name: 'Line' })).not.toHaveAttribute( |  |  |  |     await expect( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     'aria-pressed', |  |  |  |       page.getByRole('button', { name: 'Line' }) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     'true' |  |  |  |     ).not.toHaveAttribute('aria-pressed', 'true') | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     // exit sketch |  |  |  |     // exit sketch | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.openAndClearDebugPanel() |  |  |  |     await u.openAndClearDebugPanel() | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2186,8 +2136,6 @@ const doSnapAtDifferentScales = async ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.expectCmdLog('[data-message-type="execution-done"]') |  |  |  |     await u.expectCmdLog('[data-message-type="execution-done"]') | 
			
		
	
		
		
			
				
					
					|  |  |  |     await u.removeCurrentCode() |  |  |  |     await u.removeCurrentCode() | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | test.describe('Snap to close works (at any scale)', () => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   test('[0, 100, 100]', async ({ page }) => { |  |  |  |   test('[0, 100, 100]', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     await doSnapAtDifferentScales(page, [0, 100, 100], 0.01, 0.01) |  |  |  |     await doSnapAtDifferentScales(page, [0, 100, 100], 0.01, 0.01) | 
			
		
	
		
		
			
				
					
					|  |  |  |   }) |  |  |  |   }) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2979,7 +2927,7 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |      * @param {number} options.steps - The number of steps to perform |  |  |  |      * @param {number} options.steps - The number of steps to perform | 
			
		
	
		
		
			
				
					
					|  |  |  |      */ |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     const _clickConstrained = |  |  |  |     const _clickConstrained = | 
			
		
	
		
		
			
				
					
					|  |  |  |       (page: Page) => |  |  |  |       (page: Page, u: any) => | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       async ({ |  |  |  |       async ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos, |  |  |  |         hoverPos, | 
			
		
	
		
		
			
				
					
					|  |  |  |         constraintType, |  |  |  |         constraintType, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -2987,7 +2935,6 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained, |  |  |  |         expectAfterUnconstrained, | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal, |  |  |  |         expectFinal, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang = 45, |  |  |  |         ang = 45, | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps = 6, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }: { |  |  |  |       }: { | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: number; y: number } |  |  |  |         hoverPos: { x: number; y: number } | 
			
		
	
		
		
			
				
					
					|  |  |  |         constraintType: |  |  |  |         constraintType: | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3002,13 +2949,16 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps?: number |  |  |  |         steps?: number | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) => { |  |  |  |       }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() |  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |         const [x, y] = [ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           Math.cos((ang * Math.PI) / 180) * 45, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           Math.sin((ang * Math.PI) / 180) * 45, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ] |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.move(hoverPos.x + x, hoverPos.y + y) |  |  |  |         await page.mouse.move(0, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.move(hoverPos.x, hoverPos.y, { steps }) |  |  |  |         await page.waitForTimeout(1000) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         let x = 0, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           y = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         x = hoverPos.x + Math.cos(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         y = hoverPos.y - Math.sin(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(x, y) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await u.wiggleMove(x, y, 20, 30, ang, 10, 5) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.locator('.cm-content')).toContainText( |  |  |  |         await expect(page.locator('.cm-content')).toContainText( | 
			
		
	
		
		
			
				
					
					|  |  |  |           expectBeforeUnconstrained |  |  |  |           expectBeforeUnconstrained | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3024,6 +2974,14 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.locator('.cm-content')).toContainText( |  |  |  |         await expect(page.locator('.cm-content')).toContainText( | 
			
		
	
		
		
			
				
					
					|  |  |  |           expectAfterUnconstrained |  |  |  |           expectAfterUnconstrained | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(0, 0) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.waitForTimeout(1000) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         x = hoverPos.x + Math.cos(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         y = hoverPos.y - Math.sin(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(x, y) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await u.wiggleMove(x, y, 20, 30, ang, 10, 5) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         const unconstrainedLocator = page.locator( |  |  |  |         const unconstrainedLocator = page.locator( | 
			
		
	
		
		
			
				
					
					|  |  |  |           `[data-constraint-type="${constraintType}"][data-is-constrained="false"]` |  |  |  |           `[data-constraint-type="${constraintType}"][data-is-constrained="false"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3047,7 +3005,7 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |      * @param {number} options.steps - The number of steps to perform |  |  |  |      * @param {number} options.steps - The number of steps to perform | 
			
		
	
		
		
			
				
					
					|  |  |  |      */ |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     const _clickUnconstrained = |  |  |  |     const _clickUnconstrained = | 
			
		
	
		
		
			
				
					
					|  |  |  |       (page: Page) => |  |  |  |       (page: Page, u: any) => | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       async ({ |  |  |  |       async ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos, |  |  |  |         hoverPos, | 
			
		
	
		
		
			
				
					
					|  |  |  |         constraintType, |  |  |  |         constraintType, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3055,7 +3013,6 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained, |  |  |  |         expectAfterUnconstrained, | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal, |  |  |  |         expectFinal, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang = 45, |  |  |  |         ang = 45, | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps = 5, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }: { |  |  |  |       }: { | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: number; y: number } |  |  |  |         hoverPos: { x: number; y: number } | 
			
		
	
		
		
			
				
					
					|  |  |  |         constraintType: |  |  |  |         constraintType: | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3069,14 +3026,16 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang?: number |  |  |  |         ang?: number | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps?: number |  |  |  |         steps?: number | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) => { |  |  |  |       }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         const [x, y] = [ |  |  |  |         await page.mouse.move(0, 0) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           Math.cos((ang * Math.PI) / 180) * 45, |  |  |  |         await page.waitForTimeout(1000) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           Math.sin((ang * Math.PI) / 180) * 45, |  |  |  |         let x = 0, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ] |  |  |  |           y = 0 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.move(hoverPos.x + x, hoverPos.y + y) |  |  |  |         x = hoverPos.x + Math.cos(ang * deg) * 32 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         y = hoverPos.y - Math.sin(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(x, y) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await u.wiggleMove(x, y, 20, 30, ang, 10, 5) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() |  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.move(hoverPos.x, hoverPos.y, { steps }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.locator('.cm-content')).toContainText( |  |  |  |         await expect(page.locator('.cm-content')).toContainText( | 
			
		
	
		
		
			
				
					
					|  |  |  |           expectBeforeUnconstrained |  |  |  |           expectBeforeUnconstrained | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3094,7 +3053,14 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           expectAfterUnconstrained |  |  |  |           expectAfterUnconstrained | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() |  |  |  |         await expect(page.getByText('Added variable')).not.toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.move(hoverPos.x, hoverPos.y, { steps }) |  |  |  |  | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(0, 0) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.waitForTimeout(1000) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         x = hoverPos.x + Math.cos(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         y = hoverPos.y - Math.sin(ang * deg) * 32 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await page.mouse.move(x, y) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         await u.wiggleMove(x, y, 20, 30, ang, 10, 5) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         const constrainedLocator = page.locator( |  |  |  |         const constrainedLocator = page.locator( | 
			
		
	
		
		
			
				
					
					|  |  |  |           `[data-constraint-type="${constraintType}"][data-is-constrained="true"]` |  |  |  |           `[data-constraint-type="${constraintType}"][data-is-constrained="true"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3109,28 +3075,29 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     test('for segments [line, angledLine, lineTo, xLineTo]', async ({ |  |  |  |     test('for segments [line, angledLine, lineTo, xLineTo]', async ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |       page, |  |  |  |       page, | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) => { |  |  |  |     }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       test.setTimeout(120000) | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.addInitScript(async () => { |  |  |  |       await page.addInitScript(async () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         localStorage.setItem( |  |  |  |         localStorage.setItem( | 
			
		
	
		
		
			
				
					
					|  |  |  |           'persistCode', |  |  |  |           'persistCode', | 
			
		
	
		
		
			
				
					
					|  |  |  |           `const part001 = startSketchOn('XZ') |  |  |  |           `const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> startProfileAt([0, 0], %) |  |  |  |     |> startProfileAt([5 + 0, 20 + 0], %) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     |> line([0.5, -14 + 0], %) |  |  |  |     |> line([0.5, -14 + 0], %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> angledLine({ angle: 3 + 0, length: 32 + 0 }, %) |  |  |  |     |> angledLine({ angle: 3 + 0, length: 32 + 0 }, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> lineTo([33, 11.5 + 0], %) |  |  |  |     |> lineTo([5 + 33, 20 + 11.5 + 0], %) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     |> xLineTo(9 - 5, %) |  |  |  |     |> xLineTo(5 + 9 - 5, %) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     |> yLineTo(-10.77, %, 'a') |  |  |  |     |> yLineTo(20 + -10.77, %, 'a') | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     |> xLine(26.04, %) |  |  |  |     |> xLine(26.04, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> yLine(21.14 + 0, %) |  |  |  |     |> yLine(21.14 + 0, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> angledLineOfXLength({ angle: 181 + 0, length: 23.14 }, %) |  |  |  |     |> angledLineOfXLength({ angle: 181 + 0, length: 23.14 }, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> angledLineOfYLength({ angle: -91, length: 19 + 0 }, %) |  |  |  |     |> angledLineOfYLength({ angle: -91, length: 19 + 0 }, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> angledLineToX({ angle: 3 + 0, to: 26 }, %) |  |  |  |     |> angledLineToX({ angle: 3 + 0, to: 5 + 26 }, %) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     |> angledLineToY({ angle: 89, to: 9.14 + 0 }, %) |  |  |  |     |> angledLineToY({ angle: 89, to: 20 + 9.14 + 0 }, %) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     |> angledLineThatIntersects({ |  |  |  |     |> angledLineThatIntersects({ | 
			
		
	
		
		
			
				
					
					|  |  |  |           angle: 4.14, |  |  |  |           angle: 4.14, | 
			
		
	
		
		
			
				
					
					|  |  |  |           intersectTag: 'a', |  |  |  |           intersectTag: 'a', | 
			
		
	
		
		
			
				
					
					|  |  |  |           offset: 9 |  |  |  |           offset: 9 | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, %) |  |  |  |         }, %) | 
			
		
	
		
		
			
				
					
					|  |  |  |     |> tangentialArcTo([3.14 + 13, 3.14], %) |  |  |  |     |> tangentialArcTo([5 + 3.14 + 13, 20 + 3.14], %) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         ` |  |  |  |         ` | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3164,56 +3131,75 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(100) |  |  |  |       await page.waitForTimeout(100) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await u.closeDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.getByText('xLineTo(9 - 5, %)').click() |  |  |  |       await page.getByText('xLineTo(5 + 9 - 5, %)').click() | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(100) |  |  |  |       await page.waitForTimeout(100) | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.getByRole('button', { name: 'Edit Sketch' }).click() |  |  |  |       await page.getByRole('button', { name: 'Edit Sketch' }).click() | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(500) |  |  |  |       await page.waitForTimeout(500) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) |  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const clickUnconstrained = _clickUnconstrained(page) |  |  |  |       const clickUnconstrained = _clickUnconstrained(page, u) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       const clickConstrained = _clickConstrained(page) |  |  |  |       const clickConstrained = _clickConstrained(page, u) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // Drag the sketch into view | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.move(600, 64) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.down({ button: 'middle' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.move(600, 450, { steps: 10 }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.up({ button: 'middle' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.move(600, 64) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.down({ button: 'middle' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.move(600, 120, { steps: 10 }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.mouse.up({ button: 'middle' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.waitForTimeout(100) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let ang = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const line = await u.getBoundingBox(`[data-overlay-index="${0}"]`) |  |  |  |       const line = await u.getBoundingBox(`[data-overlay-index="${0}"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('line1') |  |  |  |       ang = await u.getAngle(`[data-overlay-index="${0}"]`) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       console.log('line1', line, ang) | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: line.x, y: line.y - 10 }, |  |  |  |         hoverPos: { x: line.x, y: line.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'yRelative', |  |  |  |         constraintType: 'yRelative', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: '|> line([0.5, -14 + 0], %)', |  |  |  |         expectBeforeUnconstrained: '|> line([0.5, -14 + 0], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: '|> line([0.5, -14], %)', |  |  |  |         expectAfterUnconstrained: '|> line([0.5, -14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: '|> line([0.5, yRel001], %)', |  |  |  |         expectFinal: '|> line([0.5, yRel001], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 135, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('line2') |  |  |  |       console.log('line2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: line.x, y: line.y - 10 }, |  |  |  |         hoverPos: { x: line.x, y: line.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'xRelative', |  |  |  |         constraintType: 'xRelative', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: '|> line([0.5, yRel001], %)', |  |  |  |         expectBeforeUnconstrained: '|> line([0.5, yRel001], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'line([xRel001, yRel001], %)', |  |  |  |         expectAfterUnconstrained: 'line([xRel001, yRel001], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: '|> line([0.5, yRel001], %)', |  |  |  |         expectFinal: '|> line([0.5, yRel001], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLine = await u.getBoundingBox(`[data-overlay-index="1"]`) |  |  |  |       const angledLine = await u.getBoundingBox(`[data-overlay-index="1"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="1"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLine1') |  |  |  |       console.log('angledLine1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLine.x - 10, y: angledLine.y }, |  |  |  |         hoverPos: { x: angledLine.x, y: angledLine.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'angle', |  |  |  |         constraintType: 'angle', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: |  |  |  |         expectBeforeUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLine({ angle: 3 + 0, length: 32 + 0 }, %)', |  |  |  |           'angledLine({ angle: 3 + 0, length: 32 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'angledLine({ angle: 3, length: 32 + 0 }, %)', |  |  |  |         expectAfterUnconstrained: 'angledLine({ angle: 3, length: 32 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLine({ angle: angle001, length: 32 + 0 }, %)', |  |  |  |         expectFinal: 'angledLine({ angle: angle001, length: 32 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLine2') |  |  |  |       console.log('angledLine2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLine.x - 10, y: angledLine.y }, |  |  |  |         hoverPos: { x: angledLine.x, y: angledLine.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'length', |  |  |  |         constraintType: 'length', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: |  |  |  |         expectBeforeUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLine({ angle: angle001, length: 32 + 0 }, %)', |  |  |  |           'angledLine({ angle: angle001, length: 32 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: |  |  |  |         expectAfterUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLine({ angle: angle001, length: 32 }, %)', |  |  |  |           'angledLine({ angle: angle001, length: 32 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLine({ angle: angle001, length: len001 }, %)', |  |  |  |         expectFinal: 'angledLine({ angle: angle001, length: len001 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.mouse.move(700, 250) |  |  |  |       await page.mouse.move(700, 250) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3223,36 +3209,39 @@ test.describe('Testing segment overlays', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(200) |  |  |  |       await page.waitForTimeout(200) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const lineTo = await u.getBoundingBox(`[data-overlay-index="2"]`) |  |  |  |       let lineTo = await u.getBoundingBox(`[data-overlay-index="2"]`) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="2"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('lineTo1') |  |  |  |       console.log('lineTo1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: lineTo.x, y: lineTo.y + 21 }, |  |  |  |         hoverPos: { x: lineTo.x, y: lineTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'yAbsolute', |  |  |  |         constraintType: 'yAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'lineTo([33, 11.5 + 0], %)', |  |  |  |         expectBeforeUnconstrained: 'lineTo([5 + 33, 20 + 11.5 + 0], %)', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'lineTo([33, 11.5], %)', |  |  |  |         expectAfterUnconstrained: 'lineTo([5 + 33, 31.5], %)', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'lineTo([33, yAbs001], %)', |  |  |  |         expectFinal: 'lineTo([5 + 33, yAbs001], %)', | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 8, |  |  |  |         steps: 8, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 55, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('lineTo2') |  |  |  |       console.log('lineTo2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickConstrained({ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: lineTo.x, y: lineTo.y + 25 }, |  |  |  |         hoverPos: { x: lineTo.x, y: lineTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'xAbsolute', |  |  |  |         constraintType: 'xAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'lineTo([33, yAbs001], %)', |  |  |  |         expectBeforeUnconstrained: 'lineTo([5 + 33, yAbs001], %)', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'lineTo([xAbs001, yAbs001], %)', |  |  |  |         expectAfterUnconstrained: 'lineTo([38, yAbs001], %)', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'lineTo([33, yAbs001], %)', |  |  |  |         expectFinal: 'lineTo([xAbs001, yAbs001], %)', | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 8, |  |  |  |         steps: 8, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const xLineTo = await u.getBoundingBox(`[data-overlay-index="3"]`) |  |  |  |       const xLineTo = await u.getBoundingBox(`[data-overlay-index="3"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="3"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('xlineTo1') |  |  |  |       console.log('xlineTo1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: xLineTo.x + 15, y: xLineTo.y }, |  |  |  |         hoverPos: { x: xLineTo.x, y: xLineTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'xAbsolute', |  |  |  |         constraintType: 'xAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'xLineTo(9 - 5, %)', |  |  |  |         expectBeforeUnconstrained: 'xLineTo(5 + 9 - 5, %)', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'xLineTo(4, %)', |  |  |  |         expectAfterUnconstrained: 'xLineTo(9, %)', | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'xLineTo(xAbs002, %)', |  |  |  |         expectFinal: 'xLineTo(xAbs002, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 8, |  |  |  |         steps: 8, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3297,7 +3286,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(8) |  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(8) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const clickUnconstrained = _clickUnconstrained(page) |  |  |  |       const clickUnconstrained = _clickUnconstrained(page, u) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.mouse.move(700, 250) |  |  |  |       await page.mouse.move(700, 250) | 
			
		
	
		
		
			
				
					
					|  |  |  |       for (let i = 0; i < 7; i++) { |  |  |  |       for (let i = 0; i < 7; i++) { | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3307,26 +3296,31 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(300) |  |  |  |       await page.waitForTimeout(300) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let ang = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const yLineTo = await u.getBoundingBox(`[data-overlay-index="4"]`) |  |  |  |       const yLineTo = await u.getBoundingBox(`[data-overlay-index="4"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="4"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('ylineTo1') |  |  |  |       console.log('ylineTo1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: yLineTo.x, y: yLineTo.y - 30 }, |  |  |  |         hoverPos: { x: yLineTo.x, y: yLineTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'yAbsolute', |  |  |  |         constraintType: 'yAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: "yLineTo(-10.77, %, 'a')", |  |  |  |         expectBeforeUnconstrained: "yLineTo(-10.77, %, 'a')", | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: "yLineTo(yAbs002, %, 'a')", |  |  |  |         expectAfterUnconstrained: "yLineTo(yAbs002, %, 'a')", | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: "yLineTo(-10.77, %, 'a')", |  |  |  |         expectFinal: "yLineTo(-10.77, %, 'a')", | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const xLine = await u.getBoundingBox(`[data-overlay-index="5"]`) |  |  |  |       const xLine = await u.getBoundingBox(`[data-overlay-index="5"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="5"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('xline') |  |  |  |       console.log('xline') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: xLine.x - 25, y: xLine.y }, |  |  |  |         hoverPos: { x: xLine.x, y: xLine.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'xRelative', |  |  |  |         constraintType: 'xRelative', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'xLine(26.04, %)', |  |  |  |         expectBeforeUnconstrained: 'xLine(26.04, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'xLine(xRel002, %)', |  |  |  |         expectAfterUnconstrained: 'xLine(xRel002, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'xLine(26.04, %)', |  |  |  |         expectFinal: 'xLine(26.04, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps: 10, |  |  |  |         steps: 10, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 50, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     test('for segments [yLine, angledLineOfXLength, angledLineOfYLength]', async ({ |  |  |  |     test('for segments [yLine, angledLineOfXLength, angledLineOfYLength]', async ({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3366,6 +3360,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await u.openDebugPanel() |  |  |  |       await u.openDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |       await u.expectCmdLog('[data-message-type="execution-done"]') |  |  |  |       await u.expectCmdLog('[data-message-type="execution-done"]') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await u.closeDebugPanel() |  |  |  |       await u.closeDebugPanel() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.waitForTimeout(500) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.getByText('xLineTo(9 - 5, %)').click() |  |  |  |       await page.getByText('xLineTo(9 - 5, %)').click() | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(100) |  |  |  |       await page.waitForTimeout(100) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3374,10 +3369,13 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) |  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const clickUnconstrained = _clickUnconstrained(page) |  |  |  |       const clickUnconstrained = _clickUnconstrained(page, u) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       const clickConstrained = _clickConstrained(page) |  |  |  |       const clickConstrained = _clickConstrained(page, u) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let ang = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const yLine = await u.getBoundingBox(`[data-overlay-index="6"]`) |  |  |  |       const yLine = await u.getBoundingBox(`[data-overlay-index="6"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="6"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('yline1') |  |  |  |       console.log('yline1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: yLine.x, y: yLine.y + 20 }, |  |  |  |         hoverPos: { x: yLine.x, y: yLine.y + 20 }, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3385,11 +3383,13 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'yLine(21.14 + 0, %)', |  |  |  |         expectBeforeUnconstrained: 'yLine(21.14 + 0, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'yLine(21.14, %)', |  |  |  |         expectAfterUnconstrained: 'yLine(21.14, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'yLine(yRel001, %)', |  |  |  |         expectFinal: 'yLine(yRel001, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLineOfXLength = await u.getBoundingBox( |  |  |  |       const angledLineOfXLength = await u.getBoundingBox( | 
			
		
	
		
		
			
				
					
					|  |  |  |         `[data-overlay-index="7"]` |  |  |  |         `[data-overlay-index="7"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="7"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineOfXLength1') |  |  |  |       console.log('angledLineOfXLength1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLineOfXLength.x + 20, y: angledLineOfXLength.y }, |  |  |  |         hoverPos: { x: angledLineOfXLength.x + 20, y: angledLineOfXLength.y }, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3400,6 +3400,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineOfXLength({ angle: -179, length: 23.14 }, %)', |  |  |  |           'angledLineOfXLength({ angle: -179, length: 23.14 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: |  |  |  |         expectFinal: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineOfXLength({ angle: angle001, length: 23.14 }, %)', |  |  |  |           'angledLineOfXLength({ angle: angle001, length: 23.14 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineOfXLength2') |  |  |  |       console.log('angledLineOfXLength2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3412,11 +3413,13 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: |  |  |  |         expectFinal: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineOfXLength({ angle: angle001, length: 23.14 }, %)', |  |  |  |           'angledLineOfXLength({ angle: angle001, length: 23.14 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps: 7, |  |  |  |         steps: 7, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLineOfYLength = await u.getBoundingBox( |  |  |  |       const angledLineOfYLength = await u.getBoundingBox( | 
			
		
	
		
		
			
				
					
					|  |  |  |         `[data-overlay-index="8"]` |  |  |  |         `[data-overlay-index="8"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="8"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineOfYLength1') |  |  |  |       console.log('angledLineOfYLength1') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLineOfYLength.x, y: angledLineOfYLength.y - 20 }, |  |  |  |         hoverPos: { x: angledLineOfYLength.x, y: angledLineOfYLength.y - 20 }, | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3426,7 +3429,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: |  |  |  |         expectAfterUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineOfYLength({ angle: angle002, length: 19 + 0 }, %)', |  |  |  |           'angledLineOfYLength({ angle: angle002, length: 19 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineOfYLength({ angle: -91, length: 19 + 0 }, %)', |  |  |  |         expectFinal: 'angledLineOfYLength({ angle: -91, length: 19 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 135, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 6, |  |  |  |         steps: 6, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineOfYLength2') |  |  |  |       console.log('angledLineOfYLength2') | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3438,14 +3441,13 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: |  |  |  |         expectAfterUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineOfYLength({ angle: -91, length: 19 }, %)', |  |  |  |           'angledLineOfYLength({ angle: -91, length: 19 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineOfYLength({ angle: -91, length: yRel002 }, %)', |  |  |  |         expectFinal: 'angledLineOfYLength({ angle: -91, length: yRel002 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 7, |  |  |  |         steps: 7, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     test('for segments [angledLineToX, angledLineToY, angledLineThatIntersects]', async ({ |  |  |  |     test('for segments [angledLineToX, angledLineToY, angledLineThatIntersects]', async ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |       page, |  |  |  |       page, | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) => { |  |  |  |     }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       test.skip(process.platform !== 'darwin', 'too flakey on ubuntu') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.addInitScript(async () => { |  |  |  |       await page.addInitScript(async () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         localStorage.setItem( |  |  |  |         localStorage.setItem( | 
			
		
	
		
		
			
				
					
					|  |  |  |           'persistCode', |  |  |  |           'persistCode', | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3488,17 +3490,21 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) |  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const clickUnconstrained = _clickUnconstrained(page) |  |  |  |       const clickUnconstrained = _clickUnconstrained(page, u) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       const clickConstrained = _clickConstrained(page) |  |  |  |       const clickConstrained = _clickConstrained(page, u) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let ang = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLineToX = await u.getBoundingBox(`[data-overlay-index="9"]`) |  |  |  |       const angledLineToX = await u.getBoundingBox(`[data-overlay-index="9"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="9"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineToX') |  |  |  |       console.log('angledLineToX') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLineToX.x - 20, y: angledLineToX.y }, |  |  |  |         hoverPos: { x: angledLineToX.x, y: angledLineToX.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'angle', |  |  |  |         constraintType: 'angle', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'angledLineToX({ angle: 3 + 0, to: 26 }, %)', |  |  |  |         expectBeforeUnconstrained: 'angledLineToX({ angle: 3 + 0, to: 26 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'angledLineToX({ angle: 3, to: 26 }, %)', |  |  |  |         expectAfterUnconstrained: 'angledLineToX({ angle: 3, to: 26 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineToX({ angle: angle001, to: 26 }, %)', |  |  |  |         expectFinal: 'angledLineToX({ angle: angle001, to: 26 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineToX2') |  |  |  |       console.log('angledLineToX2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3509,12 +3515,14 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: |  |  |  |         expectAfterUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineToX({ angle: angle001, to: xAbs001 }, %)', |  |  |  |           'angledLineToX({ angle: angle001, to: xAbs001 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineToX({ angle: angle001, to: 26 }, %)', |  |  |  |         expectFinal: 'angledLineToX({ angle: angle001, to: 26 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: ang + 180, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLineToY = await u.getBoundingBox(`[data-overlay-index="10"]`) |  |  |  |       const angledLineToY = await u.getBoundingBox(`[data-overlay-index="10"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="10"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineToY') |  |  |  |       console.log('angledLineToY') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: angledLineToY.x, y: angledLineToY.y + 20 }, |  |  |  |         hoverPos: { x: angledLineToY.x, y: angledLineToY.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'angle', |  |  |  |         constraintType: 'angle', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: |  |  |  |         expectBeforeUnconstrained: | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', |  |  |  |           'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3522,7 +3530,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineToY({ angle: angle002, to: 9.14 + 0 }, %)', |  |  |  |           'angledLineToY({ angle: angle002, to: 9.14 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', |  |  |  |         expectFinal: 'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps: process.platform === 'darwin' ? 8 : 9, |  |  |  |         steps: process.platform === 'darwin' ? 8 : 9, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 135, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineToY2') |  |  |  |       console.log('angledLineToY2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3532,12 +3540,13 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |           'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', |  |  |  |           'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'angledLineToY({ angle: 89, to: 9.14 }, %)', |  |  |  |         expectAfterUnconstrained: 'angledLineToY({ angle: 89, to: 9.14 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'angledLineToY({ angle: 89, to: yAbs001 }, %)', |  |  |  |         expectFinal: 'angledLineToY({ angle: 89, to: yAbs001 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 135, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const angledLineThatIntersects = await u.getBoundingBox( |  |  |  |       const angledLineThatIntersects = await u.getBoundingBox( | 
			
		
	
		
		
			
				
					
					|  |  |  |         `[data-overlay-index="11"]` |  |  |  |         `[data-overlay-index="11"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ang = await u.getAngle(`[data-overlay-index="11"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineThatIntersects') |  |  |  |       console.log('angledLineThatIntersects') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { |  |  |  |         hoverPos: { | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3560,7 +3569,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |       offset: 9, |  |  |  |       offset: 9, | 
			
		
	
		
		
			
				
					
					|  |  |  |       intersectTag: 'a' |  |  |  |       intersectTag: 'a' | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, %)`, |  |  |  |     }, %)`, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('angledLineThatIntersects2') |  |  |  |       console.log('angledLineThatIntersects2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3584,7 +3593,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |       offset: 9, |  |  |  |       offset: 9, | 
			
		
	
		
		
			
				
					
					|  |  |  |       intersectTag: 'a' |  |  |  |       intersectTag: 'a' | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, %)`, |  |  |  |     }, %)`, | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -25, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     test('for segment [tangentialArcTo]', async ({ page }) => { |  |  |  |     test('for segment [tangentialArcTo]', async ({ page }) => { | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3630,30 +3639,31 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) |  |  |  |       await expect(page.getByTestId('segment-overlay')).toHaveCount(13) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const clickUnconstrained = _clickUnconstrained(page) |  |  |  |       const clickUnconstrained = _clickUnconstrained(page, u) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       const clickConstrained = _clickConstrained(page) |  |  |  |       const clickConstrained = _clickConstrained(page, u) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const tangentialArcTo = await u.getBoundingBox( |  |  |  |       const tangentialArcTo = await u.getBoundingBox( | 
			
		
	
		
		
			
				
					
					|  |  |  |         `[data-overlay-index="12"]` |  |  |  |         `[data-overlay-index="12"]` | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let ang = await u.getAngle(`[data-overlay-index="12"]`) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('tangentialArcTo') |  |  |  |       console.log('tangentialArcTo') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickConstrained({ |  |  |  |       await clickConstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: tangentialArcTo.x - 10, y: tangentialArcTo.y + 20 }, |  |  |  |         hoverPos: { x: tangentialArcTo.x, y: tangentialArcTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'xAbsolute', |  |  |  |         constraintType: 'xAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'tangentialArcTo([3.14 + 13, -3.14], %)', |  |  |  |         expectBeforeUnconstrained: 'tangentialArcTo([3.14 + 13, -3.14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'tangentialArcTo([16.14, -3.14], %)', |  |  |  |         expectAfterUnconstrained: 'tangentialArcTo([16.14, -3.14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'tangentialArcTo([xAbs001, -3.14], %)', |  |  |  |         expectFinal: 'tangentialArcTo([xAbs001, -3.14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 6, |  |  |  |         steps: 6, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('tangentialArcTo2') |  |  |  |       console.log('tangentialArcTo2') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await clickUnconstrained({ |  |  |  |       await clickUnconstrained({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: tangentialArcTo.x - 10, y: tangentialArcTo.y + 20 }, |  |  |  |         hoverPos: { x: tangentialArcTo.x, y: tangentialArcTo.y }, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         constraintType: 'yAbsolute', |  |  |  |         constraintType: 'yAbsolute', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectBeforeUnconstrained: 'tangentialArcTo([xAbs001, -3.14], %)', |  |  |  |         expectBeforeUnconstrained: 'tangentialArcTo([xAbs001, -3.14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectAfterUnconstrained: 'tangentialArcTo([xAbs001, yAbs001], %)', |  |  |  |         expectAfterUnconstrained: 'tangentialArcTo([xAbs001, yAbs001], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         expectFinal: 'tangentialArcTo([xAbs001, -3.14], %)', |  |  |  |         expectFinal: 'tangentialArcTo([xAbs001, -3.14], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -135, |  |  |  |         ang: ang + 180, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         steps: 10, |  |  |  |         steps: 10, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3748,25 +3758,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps: 6, |  |  |  |         steps: 6, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(0) |  |  |  |       segmentToDelete = await getOverlayByIndex(11) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 20 }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'line([0.5, -14 + 0], %)', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'line', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: -45, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(0) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x - 20, y: segmentToDelete.y }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'angledLine({ angle: 3 + 0, length: 32 + 0 }, %)', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'angledLine', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ang: 135, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(200) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(9) |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: `angledLineThatIntersects({ |  |  |  |         codeToBeDeleted: `angledLineThatIntersects({ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3779,21 +3771,21 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         steps: 7, |  |  |  |         steps: 7, | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(8) |  |  |  |       segmentToDelete = await getOverlayByIndex(10) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', |  |  |  |         codeToBeDeleted: 'angledLineToY({ angle: 89, to: 9.14 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'angledLineToY', |  |  |  |         stdLibFnName: 'angledLineToY', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(7) |  |  |  |       segmentToDelete = await getOverlayByIndex(9) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x - 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x - 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'angledLineToX({ angle: 3 + 0, to: 26 }, %)', |  |  |  |         codeToBeDeleted: 'angledLineToX({ angle: 3 + 0, to: 26 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'angledLineToX', |  |  |  |         stdLibFnName: 'angledLineToX', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(6) |  |  |  |       segmentToDelete = await getOverlayByIndex(8) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 10 }, |  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 10 }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: |  |  |  |         codeToBeDeleted: | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3801,7 +3793,7 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'angledLineOfYLength', |  |  |  |         stdLibFnName: 'angledLineOfYLength', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(5) |  |  |  |       segmentToDelete = await getOverlayByIndex(7) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: |  |  |  |         codeToBeDeleted: | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3809,42 +3801,36 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'angledLineOfXLength', |  |  |  |         stdLibFnName: 'angledLineOfXLength', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(4) |  |  |  |       segmentToDelete = await getOverlayByIndex(6) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y + 10 }, |  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y + 10 }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'yLine(21.14 + 0, %)', |  |  |  |         codeToBeDeleted: 'yLine(21.14 + 0, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'yLine', |  |  |  |         stdLibFnName: 'yLine', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(3) |  |  |  |       segmentToDelete = await getOverlayByIndex(5) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x - 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x - 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'xLine(26.04, %)', |  |  |  |         codeToBeDeleted: 'xLine(26.04, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'xLine', |  |  |  |         stdLibFnName: 'xLine', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(2) |  |  |  |       segmentToDelete = await getOverlayByIndex(4) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 10 }, |  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 10 }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: "yLineTo(-10.77, %, 'a')", |  |  |  |         codeToBeDeleted: "yLineTo(-10.77, %, 'a')", | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'yLineTo', |  |  |  |         stdLibFnName: 'yLineTo', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(1) |  |  |  |       segmentToDelete = await getOverlayByIndex(3) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       await deleteSegmentSequence({ |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, |  |  |  |         hoverPos: { x: segmentToDelete.x + 10, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted: 'xLineTo(9 - 5, %)', |  |  |  |         codeToBeDeleted: 'xLineTo(9 - 5, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |         stdLibFnName: 'xLineTo', |  |  |  |         stdLibFnName: 'xLineTo', | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       for (let i = 0; i < 15; i++) { |  |  |  |       // Not sure why this is diff. from the others - Kurt, ideas? | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         await page.mouse.wheel(0, 100) |  |  |  |       segmentToDelete = await getOverlayByIndex(2) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         await page.waitForTimeout(25) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       await page.waitForTimeout(200) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       segmentToDelete = await getOverlayByIndex(0) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       const hoverPos = { x: segmentToDelete.x - 10, y: segmentToDelete.y + 10 } |  |  |  |       const hoverPos = { x: segmentToDelete.x - 10, y: segmentToDelete.y + 10 } | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.getByText('Added variable')).not.toBeVisible() |  |  |  |       await expect(page.getByText('Added variable')).not.toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |       const [x, y] = [ |  |  |  |       const [x, y] = [ | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -3863,6 +3849,24 @@ const part001 = startSketchOn('XZ') | 
			
		
	
		
		
			
				
					
					|  |  |  |       await expect(page.locator('.cm-content')).not.toContainText( |  |  |  |       await expect(page.locator('.cm-content')).not.toContainText( | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeToBeDeleted |  |  |  |         codeToBeDeleted | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       segmentToDelete = await getOverlayByIndex(1) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         hoverPos: { x: segmentToDelete.x - 20, y: segmentToDelete.y }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeToBeDeleted: 'angledLine({ angle: 3 + 0, length: 32 + 0 }, %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         stdLibFnName: 'angledLine', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: 135, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       segmentToDelete = await getOverlayByIndex(0) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await deleteSegmentSequence({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         hoverPos: { x: segmentToDelete.x, y: segmentToDelete.y - 20 }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeToBeDeleted: 'line([0.5, -14 + 0], %)', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         stdLibFnName: 'line', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ang: -45, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       await page.waitForTimeout(200) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |   }) |  |  |  |   }) | 
			
		
	
		
		
			
				
					
					|  |  |  |   test.describe('Testing delete with dependent segments', () => { |  |  |  |   test.describe('Testing delete with dependent segments', () => { | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -4158,6 +4162,11 @@ test('simulate network down and network little widget', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   await page.goto('/') |  |  |  |   await page.goto('/') | 
			
		
	
		
		
			
				
					
					|  |  |  |   await u.waitForAuthSkipAppStart() |  |  |  |   await u.waitForAuthSkipAppStart() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // This is how we wait until the stream is online | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   await expect( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     page.getByRole('button', { name: 'Start Sketch' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   ).not.toBeDisabled({ timeout: 15000 }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const networkWidget = page.locator('[data-testid="network-toggle"]') |  |  |  |   const networkWidget = page.locator('[data-testid="network-toggle"]') | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(networkWidget).toBeVisible() |  |  |  |   await expect(networkWidget).toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |   await networkWidget.hover() |  |  |  |   await networkWidget.hover() | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -4165,7 +4174,7 @@ test('simulate network down and network little widget', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const networkPopover = page.locator('[data-testid="network-popover"]') |  |  |  |   const networkPopover = page.locator('[data-testid="network-popover"]') | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(networkPopover).not.toBeVisible() |  |  |  |   await expect(networkPopover).not.toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // Expect the network to be up |  |  |  |   // (First check) Expect the network to be up | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.getByText('Network Health (Connected)')).toBeVisible() |  |  |  |   await expect(page.getByText('Network Health (Connected)')).toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // Click the network widget |  |  |  |   // Click the network widget | 
			
		
	
	
		
		
			
				
					
					|  |  | @ -4209,7 +4218,11 @@ test('simulate network down and network little widget', async ({ page }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     uploadThroughput: -1, |  |  |  |     uploadThroughput: -1, | 
			
		
	
		
		
			
				
					
					|  |  |  |   }) |  |  |  |   }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   // Expect the network to be up |  |  |  |   await expect( | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     page.getByRole('button', { name: 'Start Sketch' }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   ).not.toBeDisabled({ timeout: 15000 }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // (Second check) expect the network to be up | 
			
		
	
		
		
			
				
					
					|  |  |  |   await expect(page.getByText('Network Health (Connected)')).toBeVisible() |  |  |  |   await expect(page.getByText('Network Health (Connected)')).toBeVisible() | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
	
		
		
			
				
					
					|  |  | 
 |