openpencil/tests/e2e/tools/section.spec.ts
Danila Poyarkov 12031b76c9 feat(app): migrate position and appearance panels
- Move independent-corner presentation and batched mutations into AppearanceControls

- Rebuild Position and Appearance with aligned panel grids and semantic locators

- Replace type text headers with compact node icons and add visual coverage
2026-07-13 14:47:48 +03:00

21 lines
676 B
TypeScript

import { expect, test, useEditorSetupWithClear } from '#tests/e2e/fixtures'
const editor = useEditorSetupWithClear('/?test')
test('draw section in full editor without browser errors', async () => {
await editor.canvas.drawSection(100, 100, 240, 160)
await expect(editor.page.getByRole('img', { name: 'SECTION' })).toBeVisible()
await expect
.poll(async () => {
return editor.page.evaluate(() => {
const store = window.openPencil?.getStore?.()
const selectedId = [...store.state.selectedIds][0]
return selectedId ? store.graph.getNode(selectedId)?.type : null
})
})
.toBe('SECTION')
editor.canvas.assertNoErrors()
})