fix more tests and add a fix me

This commit is contained in:
Kurt Hutten Irev-Dev
2025-02-10 10:00:14 +11:00
parent e075622a7f
commit 064a41d675
2 changed files with 51 additions and 53 deletions

View File

@ -2267,17 +2267,15 @@ loft([profile001, profile002])
`angledLine([0, 113.01], %, $rectangleSegmentA001)` `angledLine([0, 113.01], %, $rectangleSegmentA001)`
) )
}) })
test('Can enter sketch loft edges offsetPlane and continue sketch', async ({ // This test enters the wrong sketch when selecting a loft edge, in multi profile branch before artifact graph was
scene, // migrated to rust.
toolbar, test.fixme(
editor, 'Can enter sketch loft edges offsetPlane and continue sketch',
page, async ({ scene, toolbar, editor, page, homePage }) => {
homePage, await page.addInitScript(async () => {
}) => { localStorage.setItem(
await page.addInitScript(async () => { 'persistCode',
localStorage.setItem( `sketch001 = startSketchOn('XZ')
'persistCode',
`sketch001 = startSketchOn('XZ')
profile001 = startProfileAt([34, 42.66], sketch001) profile001 = startProfileAt([34, 42.66], sketch001)
|> line(end = [102.65, 151.99]) |> line(end = [102.65, 151.99])
|> line(end = [76, -138.66]) |> line(end = [76, -138.66])
@ -2293,50 +2291,51 @@ profile002 = startProfileAt([39.43, 172.21], sketch002)
loft([profile001, profile002]) loft([profile001, profile002])
` `
)
})
await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene()
await expect(
page.getByRole('button', { name: 'Start Sketch' })
).not.toBeDisabled()
const topProfileEdgeClickCoords = { x: 602, y: 185 } as const
const [topProfileEdgeClick] = scene.makeMouseHelpers(
topProfileEdgeClickCoords.x,
topProfileEdgeClickCoords.y
) )
}) const [sideProfileEdgeClick] = scene.makeMouseHelpers(788, 188)
await page.setBodyDimensions({ width: 1000, height: 500 }) const [rect1Crn1] = scene.makeMouseHelpers(592, 283)
await homePage.goToModelingScene() const [rect1Crn2] = scene.makeMouseHelpers(797, 268)
await expect(
page.getByRole('button', { name: 'Start Sketch' })
).not.toBeDisabled()
const topProfileEdgeClickCoords = { x: 602, y: 185 } as const await scene.moveCameraTo(
const [topProfileEdgeClick] = scene.makeMouseHelpers( { x: 8171, y: -7740, z: 1624 },
topProfileEdgeClickCoords.x, { x: 3302, y: -627, z: 2892 }
topProfileEdgeClickCoords.y )
)
const [sideProfileEdgeClick] = scene.makeMouseHelpers(788, 188)
const [rect1Crn1] = scene.makeMouseHelpers(592, 283) await topProfileEdgeClick()
const [rect1Crn2] = scene.makeMouseHelpers(797, 268) await page.waitForTimeout(300)
await toolbar.editSketch()
await page.waitForTimeout(600)
await sideProfileEdgeClick()
await page.waitForTimeout(300)
await scene.expectPixelColor(TEST_COLORS.BLUE, { x: 788, y: 188 }, 15)
await scene.moveCameraTo( await toolbar.rectangleBtn.click()
{ x: 8171, y: -7740, z: 1624 }, await page.waitForTimeout(100)
{ x: 3302, y: -627, z: 2892 } await rect1Crn1()
) await editor.expectEditor.toContain(
`profile003 = startProfileAt([47.76, -17.13], plane001)`
await topProfileEdgeClick() )
await page.waitForTimeout(300) await rect1Crn2()
await toolbar.editSketch() await editor.expectEditor.toContain(
await page.waitForTimeout(600) `angledLine([0, 106.42], %, $rectangleSegmentA001)`
await sideProfileEdgeClick() )
await page.waitForTimeout(300) await page.waitForTimeout(100)
await scene.expectPixelColor(TEST_COLORS.BLUE, { x: 788, y: 188 }, 15) }
)
await toolbar.rectangleBtn.click()
await page.waitForTimeout(100)
await rect1Crn1()
await editor.expectEditor.toContain(
`profile003 = startProfileAt([47.76, -17.13], plane001)`
)
await rect1Crn2()
await editor.expectEditor.toContain(
`angledLine([0, 106.42], %, $rectangleSegmentA001)`
)
await page.waitForTimeout(100)
})
}) })
// Regression test for https://github.com/KittyCAD/modeling-app/issues/4891 // Regression test for https://github.com/KittyCAD/modeling-app/issues/4891

View File

@ -708,9 +708,8 @@ part002 = startSketchOn('XZ')
await homePage.goToModelingScene() await homePage.goToModelingScene()
await u.waitForPageLoad() await u.waitForPageLoad()
await editor.scrollToText('line(end = [74.36, 130.4], %)', true) await editor.scrollToText('line(end = [74.36, 130.4])', true)
await page.getByText('line(end = [74.36, 130.4], %)').click() await page.getByText('line(end = [74.36, 130.4])').click()
await page.screenshot({ path: 'ok.png' })
await page.getByRole('button', { name: 'Edit Sketch' }).click() await page.getByRole('button', { name: 'Edit Sketch' }).click()
const line3 = await u.getSegmentBodyCoords( const line3 = await u.getSegmentBodyCoords(