import {test, expect} from '../../fixtures/test' // Elements with many simultaneous inline style properties appear in content // imported from Word, Google Docs, or hand-crafted by instructors using the // HTML editor. Tests verify text survives even as TinyMCE may normalize or // reorder the style declaration. test.describe('elements with multiple combined inline styles', () => { test.beforeEach(async ({page, rcePage}) => { await page.goto('/scenarios/basic') await rcePage.waitForEditor() }) async function setAndGet(page: any, html: string): Promise { return page.evaluate((content: string) => { // @ts-expect-error -- TinyMCE global window.tinymce.activeEditor.setContent(content) // @ts-expect-error -- TinyMCE global return window.tinymce.activeEditor.getContent() }, html) } test('font + color + background combined — text preserved', async ({page}) => { const content = await setAndGet( page, '

Styled highlight paragraph

', ) expect(content).toContain('Styled highlight paragraph') }) test('margin + padding + border — text preserved', async ({page}) => { const content = await setAndGet( page, '
Boxed content text
', ) expect(content).toContain('Boxed content text') }) test('layout + typography combined — text preserved', async ({page}) => { const content = await setAndGet( page, '

Justified paragraph with letter spacing and line height applied together.

', ) expect(content).toContain('Justified paragraph with letter spacing') }) test('5 properties on a span — text preserved', async ({page}) => { const content = await setAndGet( page, '

Normal text five-property span more normal text.

', ) expect(content).toContain('five-property span') expect(content).toContain('more normal text') }) test('positioning with display — text preserved', async ({page}) => { const content = await setAndGet( page, '
Positioned container text
', ) expect(content).toContain('Positioned container text') }) test('print-specific styles — text preserved', async ({page}) => { const content = await setAndGet( page, '

Print-safe paragraph content.

', ) expect(content).toContain('Print-safe paragraph content') }) test('10 inline style properties on one element — no crash', async ({page}) => { const content = await setAndGet( page, '
Ten properties element
', ) expect(content).toContain('Ten properties element') }) })