Use waitForExecutionDone in lint errors test (#6070)

This commit is contained in:
Pierre Jacquier
2025-03-31 13:43:43 -04:00
committed by GitHub
parent e2b7b22ca9
commit f94f748339

View File

@ -479,6 +479,7 @@ sketch_001 = startSketchOn(XY)
test('if you write kcl with lint errors you get lints', async ({ test('if you write kcl with lint errors you get lints', async ({
page, page,
homePage, homePage,
scene,
}) => { }) => {
const u = await getUtils(page) const u = await getUtils(page)
await page.setBodyDimensions({ width: 1000, height: 500 }) await page.setBodyDimensions({ width: 1000, height: 500 })
@ -498,10 +499,7 @@ sketch_001 = startSketchOn(XY)
await page.keyboard.press('ArrowLeft') await page.keyboard.press('ArrowLeft')
await page.keyboard.press('ArrowRight') await page.keyboard.press('ArrowRight')
// FIXME: lsp errors do not propagate to the frontend until engine is connected and code is executed await scene.waitForExecutionDone()
// This timeout is to wait for engine connection. LSP and code execution errors should be handled differently
// LSP can emit errors as fast as it waits and show them in the editor
await page.waitForTimeout(10000)
// error in guter // error in guter
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible() await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()