Fix: stable E2E tests on ubuntu localhost (#5269)
* fix: Needed to increase timeout for this test. waitForExecutionDone does not work since there are errors in the KCL code * fix: again another wait for execution does not work * fix: bug that desyncs codeManager, executeCode, lspPlugin * fix: fixing react race condition on parsing numeric literals in command bar on open * fix: adding comment to clarify the gotcha * fix: saving off debugging... * fix: added wait for execution done * fix: removing testing code * fix: adding wait for execution done * fix: adding execution done wait * fix: only fixes the chamfer point and click delete * fix: add 1250ms before every progresscmdbar, removed model loaded scene state that is flaky, added toast if someone presses the command bar too quickly * fix: adding a wait for execution * fix: updating wait for execution * fix: wait for execution done * fix: wait for execution done * fix: not waiting for scene, not waiting for command bar * fix: restoring name * fix: auto fixes * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * fix: bad prompt fix * fix: Fixed testing selections with wait * fix: last wait fix * fix: trying to resolve more flakes when running with more workers * chore: adding a skipLocalEngine tag * fix: fixing test when using local engine * fix: codespell * fix: big if true * chore: skipping one more local engine tests that fails * fix: auto fix: * fix: restoring this testing code --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -248,7 +248,11 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  test('Solids should be select and deletable', async ({ page, homePage }) => {
 | 
			
		||||
  test('Solids should be select and deletable', async ({
 | 
			
		||||
    page,
 | 
			
		||||
    homePage,
 | 
			
		||||
    scene,
 | 
			
		||||
  }) => {
 | 
			
		||||
    test.setTimeout(90_000)
 | 
			
		||||
    const u = await getUtils(page)
 | 
			
		||||
    await page.addInitScript(async () => {
 | 
			
		||||
@ -320,10 +324,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    await page.setBodyDimensions({ width: 1000, height: 500 })
 | 
			
		||||
 | 
			
		||||
    await homePage.goToModelingScene()
 | 
			
		||||
 | 
			
		||||
    await u.openDebugPanel()
 | 
			
		||||
    await u.expectCmdLog('[data-message-type="execution-done"]')
 | 
			
		||||
    await u.closeDebugPanel()
 | 
			
		||||
    await scene.waitForExecutionDone()
 | 
			
		||||
 | 
			
		||||
    await u.openAndClearDebugPanel()
 | 
			
		||||
    await u.sendCustomCmd({
 | 
			
		||||
@ -902,6 +903,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
  test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({
 | 
			
		||||
    page,
 | 
			
		||||
    homePage,
 | 
			
		||||
    scene,
 | 
			
		||||
  }) => {
 | 
			
		||||
    const cases = [
 | 
			
		||||
      {
 | 
			
		||||
@ -937,6 +939,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    await page.setBodyDimensions({ width: 1200, height: 500 })
 | 
			
		||||
 | 
			
		||||
    await homePage.goToModelingScene()
 | 
			
		||||
    await scene.waitForExecutionDone()
 | 
			
		||||
    await u.openAndClearDebugPanel()
 | 
			
		||||
 | 
			
		||||
    await u.sendCustomCmd({
 | 
			
		||||
@ -970,6 +973,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
  test("Hovering and selection of extruded faces works, and is not overridden shortly after user's click", async ({
 | 
			
		||||
    page,
 | 
			
		||||
    homePage,
 | 
			
		||||
    scene,
 | 
			
		||||
  }) => {
 | 
			
		||||
    await page.addInitScript(async () => {
 | 
			
		||||
      localStorage.setItem(
 | 
			
		||||
@ -988,6 +992,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    await page.setBodyDimensions({ width: 1200, height: 500 })
 | 
			
		||||
 | 
			
		||||
    await homePage.goToModelingScene()
 | 
			
		||||
    await scene.waitForExecutionDone()
 | 
			
		||||
    await u.openAndClearDebugPanel()
 | 
			
		||||
 | 
			
		||||
    await u.sendCustomCmd({
 | 
			
		||||
@ -1021,19 +1026,19 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
      .poll(() => u.getGreatestPixDiff(extrudeWall, noHoverColor))
 | 
			
		||||
      .toBeLessThan(15)
 | 
			
		||||
    await page.mouse.move(nothing.x, nothing.y)
 | 
			
		||||
    await page.waitForTimeout(100)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await page.mouse.move(extrudeWall.x, extrudeWall.y)
 | 
			
		||||
    await expect(page.getByTestId('hover-highlight').first()).toBeVisible()
 | 
			
		||||
    await expect(page.getByTestId('hover-highlight').first()).toContainText(
 | 
			
		||||
      removeAfterFirstParenthesis(extrudeText)
 | 
			
		||||
    )
 | 
			
		||||
    await page.waitForTimeout(200)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await expect(
 | 
			
		||||
      await u.getGreatestPixDiff(extrudeWall, hoverColor)
 | 
			
		||||
    ).toBeLessThan(15)
 | 
			
		||||
    await page.mouse.click(extrudeWall.x, extrudeWall.y)
 | 
			
		||||
    await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${extrudeText}`)
 | 
			
		||||
    await page.waitForTimeout(200)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await expect(
 | 
			
		||||
      await u.getGreatestPixDiff(extrudeWall, selectColor)
 | 
			
		||||
    ).toBeLessThan(15)
 | 
			
		||||
@ -1044,7 +1049,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    ).toBeLessThan(15)
 | 
			
		||||
 | 
			
		||||
    await page.mouse.move(nothing.x, nothing.y)
 | 
			
		||||
    await page.waitForTimeout(300)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await expect(page.getByTestId('hover-highlight')).not.toBeVisible()
 | 
			
		||||
 | 
			
		||||
    // because of shading, color is not exact everywhere on the face
 | 
			
		||||
@ -1058,11 +1063,11 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
    await expect(page.getByTestId('hover-highlight').first()).toContainText(
 | 
			
		||||
      removeAfterFirstParenthesis(capText)
 | 
			
		||||
    )
 | 
			
		||||
    await page.waitForTimeout(200)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await expect(await u.getGreatestPixDiff(cap, hoverColor)).toBeLessThan(15)
 | 
			
		||||
    await page.mouse.click(cap.x, cap.y)
 | 
			
		||||
    await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${capText}`)
 | 
			
		||||
    await page.waitForTimeout(200)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15)
 | 
			
		||||
    await page.waitForTimeout(1000)
 | 
			
		||||
    // check color stays there, i.e. not overridden (this was a bug previously)
 | 
			
		||||
@ -1109,7 +1114,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
  |> line(end = [4.95, -8])
 | 
			
		||||
  |> line(end = [-20.38, -10.12])
 | 
			
		||||
  |> line(end = [-15.79, 17.08])
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
    fn yohey = (pos) => {
 | 
			
		||||
  sketch004 = startSketchOn('XZ')
 | 
			
		||||
  ${extrudeAndEditBlockedInFunction}
 | 
			
		||||
@ -1119,7 +1124,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
 | 
			
		||||
  |> line(end = [-15.79, 17.08])
 | 
			
		||||
  return ''
 | 
			
		||||
    }
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
    yohey([15.79, -34.6])
 | 
			
		||||
    `
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user