import {test, expect} from '../../fixtures/test' // text-indent creates visual indentation for first lines of paragraphs. // It is used in formal course documents, legal-style content, and imported // Word documents. Negative text-indent is used for hanging indents (citations, // bibliographies). Text must survive regardless of indent style handling. test.describe('text-indent CSS property', () => { 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('text-indent: 2em — text preserved', async ({page}) => { const content = await setAndGet( page, '

Indented first line paragraph text here.

', ) expect(content).toContain('Indented first line paragraph text here') }) test('text-indent: 30px — text preserved', async ({page}) => { const content = await setAndGet( page, '

Pixel-indented paragraph.

', ) expect(content).toContain('Pixel-indented paragraph') }) test('negative text-indent for hanging indent — text preserved', async ({page}) => { const content = await setAndGet( page, '

Hanging indent citation text here.

', ) expect(content).toContain('Hanging indent citation text here') }) test('multiple paragraphs with text-indent — all text preserved', async ({page}) => { const content = await setAndGet( page, '

First indented paragraph.

Second indented paragraph.

', ) expect(content).toContain('First indented paragraph') expect(content).toContain('Second indented paragraph') }) test('text-indent on a blockquote — text preserved', async ({page}) => { const content = await setAndGet( page, '

Indented block quote content.

', ) expect(content).toContain('Indented block quote content') }) })