import { test, expect } from '@playwright/test' const wysiwygUrl = '/en/wysiwyg' test.describe('WYSIWYG - Guides toggle and multiselect live region', () => { test('toggles guides and announces multiselect in aria-live', async ({ page }) => { await page.goto(wysiwygUrl) // Canvas and live region present const canvas = page.getByTestId('wysiwyg-canvas') await expect(canvas).toBeVisible() const live = page.getByTestId('aria-live') await expect(live).toContainText(/선택\s*0개/) // Add two text objects const addText = page.getByRole('button', { name: /^Add Text$/i }) await addText.click() await addText.click() // Marquee select both const box = await canvas.boundingBox() if (!box) throw new Error('canvas not found') await page.mouse.move(box.x + 40, box.y + 40) await page.mouse.down() await page.mouse.move(box.x + 300, box.y + 200) await page.mouse.up() await expect(live).toContainText(/선택\s*2개/) // Guides toggle const guidesBtn = page.getByRole('button', { name: /Guides/i }) await expect(guidesBtn).toHaveAttribute('aria-pressed', 'true') await guidesBtn.click() await expect(guidesBtn).toHaveAttribute('aria-pressed', 'false') await guidesBtn.click() await expect(guidesBtn).toHaveAttribute('aria-pressed', 'true') }) })