import {test, expect} from '../../fixtures/test' // HTML5 semantic container elements (article, section, aside, nav, time, address) // appear in content pasted from modern web pages and CMS exports into Canvas. // TinyMCE may preserve them, convert them to divs, or strip them — all outcomes // are documented here so a refactor can detect behavior changes. test.describe('HTML5 semantic container 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('
text content is preserved regardless of element handling', async ({page}) => { const content = await setAndGet( page, '

Article Title

Article body text.

', ) expect(content).toContain('Article Title') expect(content).toContain('Article body text') }) test('
text content is preserved', async ({page}) => { const content = await setAndGet( page, '

Section Heading

Section content here.

', ) expect(content).toContain('Section Heading') expect(content).toContain('Section content here') }) test('