AI-native design editor. Open-source Figma alternative.
import { expect, test } from '@playwright/test'
test('alignment arrows move spatially without applying until activation', async ({ page }) => {
await page.goto('/iframe.html?id=app-editor-properties-layout-alignment--default&viewMode=story')
const first = page.getByRole('button', { name: 'Top left', exact: true })
await first.focus()
await first.press('ArrowRight')
const topCenter = page.getByRole('button', { name: 'Top center', exact: true })
await expect(topCenter).toBeFocused()
await expect(first).toHaveAttribute('aria-pressed', 'true')
await topCenter.press('ArrowDown')
const center = page.getByRole('button', { name: 'Middle center', exact: true })
await expect(center).toBeFocused()
await center.press('Space')
await expect(center).toHaveAttribute('aria-pressed', 'true')
await expect(first).toHaveAttribute('aria-pressed', 'false')
await center.press('End')
const last = page.getByRole('button', { name: 'Bottom right', exact: true })
await expect(last).toBeFocused()
await last.press('ArrowRight')
await expect(last).toBeFocused()
await last.press('Home')
await expect(first).toBeFocused()
})