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:
Kevin Nadro
2025-02-11 11:13:25 -06:00
committed by GitHub
parent 162856064b
commit 28311d160a
20 changed files with 411 additions and 320 deletions

View File

@ -10,6 +10,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
test('Typing KCL errors induces a badge on the code pane button', async ({
page,
homePage,
scene,
}) => {
const u = await getUtils(page)
@ -30,11 +31,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
await page.setBodyDimensions({ width: 1200, height: 500 })
await homePage.goToModelingScene()
// wait for execution done
await u.openDebugPanel()
await u.expectCmdLog('[data-message-type="execution-done"]')
await u.closeDebugPanel()
await scene.waitForExecutionDone()
// Ensure no badge is present
const codePaneButtonHolder = page.locator('#code-button-holder')
@ -175,7 +172,9 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
await page.setBodyDimensions({ width: 1200, height: 500 })
await homePage.goToModelingScene()
await page.waitForTimeout(1000)
// FIXME: await scene.waitForExecutionDone() does not work. It still fails.
// I needed to increase this timeout to get this to pass.
await page.waitForTimeout(10000)
// Ensure badge is present
const codePaneButtonHolder = page.locator('#code-button-holder')
@ -187,7 +186,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
// click in the editor to focus it
await page.locator('.cm-content').click()
await page.waitForTimeout(500)
await page.waitForTimeout(2000)
// go to the start of the editor and enter more text which will trigger
// a lint error.
@ -204,8 +203,9 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
await page.keyboard.press('ArrowUp')
await page.keyboard.press('Home')
await page.keyboard.type('foo_bar = 1')
await page.waitForTimeout(500)
await page.waitForTimeout(2000)
await page.keyboard.press('Enter')
await page.waitForTimeout(2000)
// ensure we have a lint error
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()