openpencil/tests/e2e/storybook/button.spec.ts
Danila Poyarkov e69ba75c12
refactor(ui): compose shared editor controls (#670)
* refactor(ui): extract shared action and navigation primitives

* refactor(ui): compose settings and libraries with shared tabs

* feat(ui): preserve native activation and toolbar keyboard navigation

* refactor(home): share document entries and accessible input controls

* fix(layers): share virtualized row geometry and selection styling

* refactor(layout): compose spacing and readable dimension controls

* refactor(properties): compose advanced strokes and inline effects

* refactor(ui): reuse actions in page and property controls

* refactor(settings): adopt shared actions without changing workflows

* refactor(ui): share collaboration and provider actions

* refactor(ui): finish shell and paint action composition

* test(ui): restore extracted control and settings coverage

* test(ui): complete workflow extraction coverage

* fix(ui): address review and trim redundant snapshots

* fix(layout): preserve single-step Undo for guides and wrap
2026-09-10 12:09:06 +03:00

11 lines
573 B
TypeScript

import { expect, test } from '@playwright/test'
test('action buttons keep CJK labels single-line and allow explicit wrapping', async ({ page }) => {
await page.goto('/iframe.html?id=design-system-actions-button--constrained-labels&viewMode=story')
const single = page.getByRole('button', { name: '保存设置' })
await expect(single).toHaveCSS('white-space', 'nowrap')
const wrapping = page.getByRole('button', { name: 'A deliberately wrapping action label' })
await expect(wrapping).toHaveCSS('white-space', 'normal')
await expect(wrapping).toBeVisible()
})