Continue running broken tests for Axiom metrics (#5883)
* Install Vector on Ubuntu to log failed test to Axiom * Allow flaky tests to run on main for Axiom metrics * Enable problematic tests on a dedicated branch
This commit is contained in:
@ -188,7 +188,8 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
page.getByRole('button', { name: 'Start Sketch' })
|
||||
).toBeVisible()
|
||||
})
|
||||
test.fixme('Can edit segments by dragging their handles', () => {
|
||||
test('Can edit segments by dragging their handles', () => {
|
||||
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
|
||||
const doEditSegmentsByDraggingHandle = async (
|
||||
page: Page,
|
||||
homePage: HomePageFixture,
|
||||
@ -1086,107 +1087,108 @@ profile001 = startProfileAt([${roundOff(scale * 69.6)}, ${roundOff(
|
||||
)
|
||||
})
|
||||
// TODO: fix after electron migration is merged
|
||||
test.fixme(
|
||||
'empty-scene default-planes act as expected',
|
||||
async ({ page, homePage }) => {
|
||||
/**
|
||||
* Tests the following things
|
||||
* 1) The the planes are there on load because the scene is empty
|
||||
* 2) The planes don't changes color when hovered initially
|
||||
* 3) Putting something in the scene makes the planes hidden
|
||||
* 4) Removing everything from the scene shows the plans again
|
||||
* 3) Once "start sketch" is click, the planes do respond to hovers
|
||||
* 4) Selecting a plan works as expected, i.e. sketch mode
|
||||
* 5) Reloading the scene with something already in the scene means the planes are hidden
|
||||
*/
|
||||
test('empty-scene default-planes act as expected', async ({
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
|
||||
/**
|
||||
* Tests the following things
|
||||
* 1) The the planes are there on load because the scene is empty
|
||||
* 2) The planes don't changes color when hovered initially
|
||||
* 3) Putting something in the scene makes the planes hidden
|
||||
* 4) Removing everything from the scene shows the plans again
|
||||
* 3) Once "start sketch" is click, the planes do respond to hovers
|
||||
* 4) Selecting a plan works as expected, i.e. sketch mode
|
||||
* 5) Reloading the scene with something already in the scene means the planes are hidden
|
||||
*/
|
||||
|
||||
const u = await getUtils(page)
|
||||
await homePage.goToModelingScene()
|
||||
const u = await getUtils(page)
|
||||
await homePage.goToModelingScene()
|
||||
|
||||
await u.openDebugPanel()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.closeDebugPanel()
|
||||
await u.openDebugPanel()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.closeDebugPanel()
|
||||
|
||||
const XYPlanePoint = { x: 774, y: 116 } as const
|
||||
const unHoveredColor: [number, number, number] = [47, 47, 93]
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, unHoveredColor)
|
||||
).toBeLessThan(8)
|
||||
const XYPlanePoint = { x: 774, y: 116 } as const
|
||||
const unHoveredColor: [number, number, number] = [47, 47, 93]
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, unHoveredColor)
|
||||
).toBeLessThan(8)
|
||||
|
||||
await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(200)
|
||||
await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(200)
|
||||
|
||||
// color should not change for having been hovered
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, unHoveredColor)
|
||||
).toBeLessThan(8)
|
||||
// color should not change for having been hovered
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, unHoveredColor)
|
||||
).toBeLessThan(8)
|
||||
|
||||
await u.openAndClearDebugPanel()
|
||||
await u.openAndClearDebugPanel()
|
||||
|
||||
await u.codeLocator.fill(`sketch001 = startSketchOn('XY')
|
||||
await u.codeLocator.fill(`sketch001 = startSketchOn('XY')
|
||||
|> startProfileAt([-10, -10], %)
|
||||
|> line(end = [20, 0])
|
||||
|> line(end = [0, 20])
|
||||
|> xLine(length = -20)
|
||||
`)
|
||||
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
|
||||
const noPlanesColor: [number, number, number] = [30, 30, 30]
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, noPlanesColor)
|
||||
).toBeLessThan(3)
|
||||
const noPlanesColor: [number, number, number] = [30, 30, 30]
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, noPlanesColor)
|
||||
).toBeLessThan(3)
|
||||
|
||||
await u.clearCommandLogs()
|
||||
await u.removeCurrentCode()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.clearCommandLogs()
|
||||
await u.removeCurrentCode()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
|
||||
await expect
|
||||
.poll(() => u.getGreatestPixDiff(XYPlanePoint, unHoveredColor), {
|
||||
timeout: 5_000,
|
||||
})
|
||||
.toBeLessThan(8)
|
||||
await expect
|
||||
.poll(() => u.getGreatestPixDiff(XYPlanePoint, unHoveredColor), {
|
||||
timeout: 5_000,
|
||||
})
|
||||
.toBeLessThan(8)
|
||||
|
||||
// click start Sketch
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y, { steps: 50 })
|
||||
const hoveredColor: [number, number, number] = [93, 93, 127]
|
||||
// now that we're expecting the user to select a plan, it does respond to hover
|
||||
await expect
|
||||
.poll(() => u.getGreatestPixDiff(XYPlanePoint, hoveredColor))
|
||||
.toBeLessThan(8)
|
||||
// click start Sketch
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y, { steps: 50 })
|
||||
const hoveredColor: [number, number, number] = [93, 93, 127]
|
||||
// now that we're expecting the user to select a plan, it does respond to hover
|
||||
await expect
|
||||
.poll(() => u.getGreatestPixDiff(XYPlanePoint, hoveredColor))
|
||||
.toBeLessThan(8)
|
||||
|
||||
await page.mouse.click(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(600)
|
||||
await page.mouse.click(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(600)
|
||||
|
||||
await page.mouse.click(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(200)
|
||||
await page.mouse.click(XYPlanePoint.x + 50, XYPlanePoint.y + 50)
|
||||
await expect(u.codeLocator).toHaveText(`sketch001 = startSketchOn('XZ')
|
||||
await page.mouse.click(XYPlanePoint.x, XYPlanePoint.y)
|
||||
await page.waitForTimeout(200)
|
||||
await page.mouse.click(XYPlanePoint.x + 50, XYPlanePoint.y + 50)
|
||||
await expect(u.codeLocator).toHaveText(`sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([11.8, 9.09], %)
|
||||
|> line(end = [3.39, -3.39])
|
||||
`)
|
||||
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([11.8, 9.09], %)
|
||||
|> line(end = [3.39, -3.39])
|
||||
`
|
||||
)
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
await u.openDebugPanel()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.closeDebugPanel()
|
||||
await u.openDebugPanel()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.closeDebugPanel()
|
||||
|
||||
// expect there to be no planes on load since there's something in the scene
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, noPlanesColor)
|
||||
).toBeLessThan(3)
|
||||
}
|
||||
)
|
||||
// expect there to be no planes on load since there's something in the scene
|
||||
expect(
|
||||
await u.getGreatestPixDiff(XYPlanePoint, noPlanesColor)
|
||||
).toBeLessThan(3)
|
||||
})
|
||||
|
||||
test('Can attempt to sketch on revolved face', async ({ page, homePage }) => {
|
||||
const u = await getUtils(page)
|
||||
@ -1460,10 +1462,11 @@ test.describe(`Sketching with offset planes`, () => {
|
||||
})
|
||||
|
||||
test.describe('multi-profile sketching', () => {
|
||||
test.fixme(
|
||||
test(
|
||||
`test it removes half-finished expressions when changing tools in sketch mode`,
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ context, page, scene, toolbar, editor, homePage, cmdBar }) => {
|
||||
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
|
||||
// We seed the scene with a single offset plane
|
||||
await context.addInitScript(() => {
|
||||
localStorage.setItem(
|
||||
@ -2852,13 +2855,18 @@ loft([profile001, profile002])
|
||||
)
|
||||
}
|
||||
)
|
||||
test.fixme(
|
||||
'Can enter sketch loft edges offsetPlane and continue sketch',
|
||||
async ({ scene, toolbar, editor, page, homePage }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
test('Can enter sketch loft edges offsetPlane and continue sketch', async ({
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
profile001 = startProfileAt([34, 42.66], sketch001)
|
||||
|> line(end = [102.65, 151.99])
|
||||
|> line(end = [76, -138.66])
|
||||
@ -2874,51 +2882,50 @@ profile002 = startProfileAt([39.43, 172.21], sketch002)
|
||||
|
||||
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)
|
||||
})
|
||||
|
||||
const [rect1Crn1] = scene.makeMouseHelpers(592, 283)
|
||||
const [rect1Crn2] = scene.makeMouseHelpers(797, 268)
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
await homePage.goToModelingScene()
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Start Sketch' })
|
||||
).not.toBeDisabled()
|
||||
|
||||
await scene.moveCameraTo(
|
||||
{ x: 8171, y: -7740, z: 1624 },
|
||||
{ x: 3302, y: -627, z: 2892 }
|
||||
)
|
||||
const topProfileEdgeClickCoords = { x: 602, y: 185 } as const
|
||||
const [topProfileEdgeClick] = scene.makeMouseHelpers(
|
||||
topProfileEdgeClickCoords.x,
|
||||
topProfileEdgeClickCoords.y
|
||||
)
|
||||
const [sideProfileEdgeClick] = scene.makeMouseHelpers(788, 188)
|
||||
|
||||
await topProfileEdgeClick()
|
||||
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)
|
||||
const [rect1Crn1] = scene.makeMouseHelpers(592, 283)
|
||||
const [rect1Crn2] = scene.makeMouseHelpers(797, 268)
|
||||
|
||||
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)
|
||||
}
|
||||
)
|
||||
await scene.moveCameraTo(
|
||||
{ x: 8171, y: -7740, z: 1624 },
|
||||
{ x: 3302, y: -627, z: 2892 }
|
||||
)
|
||||
|
||||
await topProfileEdgeClick()
|
||||
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 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
|
||||
|
Reference in New Issue
Block a user