import {test, expect} from '../../fixtures/test' // Nested blockquotes appear in academic course content for multi-level citation, // dialogue representation, and thread-style quote replies. Each level of nesting // must survive serialization without collapsing into a single level. test.describe('nested blockquote elements', () => { 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('two-level nested blockquote preserves both levels of text', async ({page}) => { const content = await setAndGet( page, '

Outer quote.

Inner quote.

', ) expect(content).toContain('Outer quote') expect(content).toContain('Inner quote') }) test('three-level nested blockquote preserves all text', async ({page}) => { const content = await setAndGet( page, '

Level 1

Level 2

Level 3

', ) expect(content).toContain('Level 1') expect(content).toContain('Level 2') expect(content).toContain('Level 3') }) test('blockquote containing list is preserved', async ({page}) => { const content = await setAndGet( page, '

Key points:

', ) expect(content).toContain('Key points') expect(content).toContain('First point') expect(content).toContain('Second point') expect(content).toMatch(/