diff --git a/apps/app/e2e/shell/editor-finding-dialog.spec.ts b/apps/app/e2e/shell/editor-finding-dialog.spec.ts index 70baae23..7c1c01a3 100644 --- a/apps/app/e2e/shell/editor-finding-dialog.spec.ts +++ b/apps/app/e2e/shell/editor-finding-dialog.spec.ts @@ -89,7 +89,9 @@ test.describe('finding dialog', () => { rows: await rows(page).count(), y: await page.evaluate(() => window.scrollY), } - await row.focus({ preventScroll: true }) + await row.evaluate((element: HTMLElement) => + element.focus({ preventScroll: true }), + ) await page.keyboard.press('Enter') await expect(dialog(page)).toBeVisible() await page.keyboard.press('Escape') diff --git a/apps/app/tests/helpers/findingDialog.ts b/apps/app/tests/helpers/findingDialog.ts index 6f3c495c..0c064211 100644 --- a/apps/app/tests/helpers/findingDialog.ts +++ b/apps/app/tests/helpers/findingDialog.ts @@ -1,5 +1,6 @@ import { act, screen, waitFor, within } from '@testing-library/react' import type userEvent from '@testing-library/user-event' +import { expect } from 'vitest' type User = ReturnType diff --git a/apps/app/tests/unit/editor-history-entry.test.ts b/apps/app/tests/unit/editor-history-entry.test.ts index e72e7b13..0e91da19 100644 --- a/apps/app/tests/unit/editor-history-entry.test.ts +++ b/apps/app/tests/unit/editor-history-entry.test.ts @@ -1,5 +1,6 @@ /** R2F-1: the history entry, its ownership, the write plan and the write budget. */ import { describe, expect, it } from 'vitest' +import type { ElementKey } from '@faunosteo/core-wasm/types' import { createWriteBudget, ENTRY_KEY, @@ -33,7 +34,7 @@ const entry = (patch: Partial = {}): HistoryEntry => ({ }) const stateOf = (value: unknown) => ({ [ENTRY_KEY]: value }) -const node = { kind: 'finding', zone_id: 'z', path: ['f', 'n'] } as const +const node: ElementKey = { kind: 'finding', zone_id: 'z', path: ['f', 'n'] } describe('sanitizeView', () => { it('keeps a tab and a section, and drops a malformed layer', () => {