fix: E2E test assumes codemirror error is present when it is lazy loaded (#5446)

* fix: test is written incorrectly, assumes codemirror has DOM content when it does not

* fix: auto fmt fixes
This commit is contained in:
Kevin Nadro
2025-02-20 17:33:13 -06:00
committed by GitHub
parent fd07b8cff5
commit 59b1c414f0

View File

@ -117,7 +117,7 @@ test(
test( test(
'open a file in a project works and renders, open another file in different project with errors, it should clear the scene', 'open a file in a project works and renders, open another file in different project with errors, it should clear the scene',
{ tag: '@electron' }, { tag: '@electron' },
async ({ context, page }, testInfo) => { async ({ context, page, editor }, testInfo) => {
await context.folderSetupFn(async (dir) => { await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket') const bracketDir = path.join(dir, 'bracket')
await fsp.mkdir(bracketDir, { recursive: true }) await fsp.mkdir(bracketDir, { recursive: true })
@ -180,6 +180,11 @@ test(
await page.getByText('broken-code').click() await page.getByText('broken-code').click()
await page.waitForTimeout(2000)
await editor.scrollToText(
"|> line(end = [0, wallMountL], tag = 'outerEdge')"
)
// error in guter // error in guter
await expect(page.locator('.cm-lint-marker-error')).toBeVisible() await expect(page.locator('.cm-lint-marker-error')).toBeVisible()