import {test, expect} from '../../fixtures/test' // marks inline quotations and supports a cite attribute for the source URL. // Course content uses for short quotes within paragraphs, distinguished from // block-level
. The cite attribute is informational (not rendered by // browsers) but must survive for semantic preservation. test.describe(' inline quotation element', () => { 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(' inline quotation — text preserved', async ({page}) => { const content = await setAndGet( page, '

As Shakespeare wrote, To be or not to be, that is the question.

', ) expect(content).toContain('To be or not to be') expect(content).toContain('that is the question') }) test(' with cite attribute — text preserved', async ({page}) => { const content = await setAndGet( page, '

According to the spec: The cite attribute gives the address of the source.

', ) expect(content).toContain('gives the address of the source') }) test('nested for quote within quote — text preserved', async ({page}) => { const content = await setAndGet( page, '

She said He told me come back tomorrow last week.

', ) expect(content).toContain('come back tomorrow') expect(content).toContain('last week') }) test('multiple in paragraph — all text preserved', async ({page}) => { const content = await setAndGet( page, '

The terms array and list are sometimes used interchangeably.

', ) expect(content).toContain('array') expect(content).toContain('list') expect(content).toContain('interchangeably') }) test(' inside
— text preserved', async ({page}) => { const content = await setAndGet( page, '

The author noted: brevity is the soul of wit.

', ) expect(content).toContain('brevity is the soul of wit') }) test(' — French quote text preserved', async ({page}) => { const content = await setAndGet( page, '

In French: Liberté, Égalité, Fraternité.

', ) // French accented chars may be entity-encoded expect(content).toContain('Libert') }) })