import {test, expect} from '../../fixtures/test' // backdrop-filter applies visual effects to the area behind an element — // blurring, saturating, or brightening content underneath overlays and modals. // The CSS `appearance` property controls native widget styling. TinyMCE may // strip these; the text content that accompanies them must always survive. test.describe('CSS backdrop-filter and appearance properties', () => { 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('backdrop-filter: blur on overlay — label text preserved', async ({page}) => { const content = await setAndGet( page, '

Notice: This content requires completing Module 3 first.

', ) expect(content).toContain('completing Module 3') }) test('backdrop-filter: saturate on callout — text preserved', async ({page}) => { const content = await setAndGet( page, '

Key Concept: The central dogma of molecular biology describes the flow of genetic information.

', ) expect(content).toContain('central dogma') expect(content).toContain('genetic information') }) test('appearance: none on styled button label — text preserved', async ({page}) => { const content = await setAndGet( page, '

Click Submit Assignment when ready.

', ) expect(content).toContain('Submit Assignment') expect(content).toContain('when ready') }) test('webkit-backdrop-filter on frosted glass box — content preserved', async ({page}) => { const content = await setAndGet( page, '

Announcement: Final exam moved to December 15th in Lecture Hall B.

', ) expect(content).toContain('Final exam') expect(content).toContain('Lecture Hall B') }) test('multiple visual filter properties — content preserved', async ({page}) => { const content = await setAndGet( page, '

Assignment Feedback

Your analysis of the primary sources was thorough and well-cited.

', ) expect(content).toContain('Assignment Feedback') expect(content).toContain('primary sources') expect(content).toContain('well-cited') }) })