Skip to content

test(e2e): port markdown_rendering.feature to playwright#73633

Draft
carl-codeorg wants to merge 1 commit into
stagingfrom
p20-1641/markdown-tests-port
Draft

test(e2e): port markdown_rendering.feature to playwright#73633
carl-codeorg wants to merge 1 commit into
stagingfrom
p20-1641/markdown-tests-port

Conversation

@carl-codeorg

@carl-codeorg carl-codeorg commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Ports the Visiting an external markdown level with details tag scenario from markdown_rendering.feature to markdown-rendering.spec.ts.

The test covers dashboard's "external" level type, which renders authored markdown — including raw HTML like <details>/<summary> — directly into the level body via SafeMarkdown. It:

  • Loads an external markdown level and confirms the level body's <details id="cool-list"> starts closed.
  • Clicks the <summary> tag and confirms the details element opens (open attribute set).

This exercises SafeMarkdown's raw-HTML passthrough for interactive elements, not just text rendering — a regression here would mean authored <details>/collapsible content silently stops working across every course that uses it.

What's not ported

The feature's second scenario (Viewing a level with blockly embedded in instructions, tagged @eyes) asserts pixel-level visual parity against Applitools-approved baselines for Blockly embedded in level instructions. There's no equivalent visual-regression harness in this Playwright suite (playwright.config.ts's screenshot: 'only-on-failure' is a failure artifact, not a baseline-diff mechanism), so porting just the navigate + lab-ready wait would silently drop the scenario's actual assertion. This gap is documented in a comment at the top of the spec file; the scenario stays in Cucumber/Applitools for now.

Migration mechanics

  • Original feature file is tagged @playwright so the Cucumber suite skips the ported scenario, avoiding duplicate coverage.
  • Adds MarkdownLevel page object (markdown-level.ts) and extends LessonLevelPage (lesson-level-page.ts) with a shared navigateToLevel helper for lab-level URLs.
  • Verified green under the repo's 5x/all-browser stress gate.

Links

JIRA

Testing story

Deployment notes

Privacy and security

…ring.feature to playwright

Port 2 scenarios from dashboard/test/ui/features/foundations/markdown_rendering.feature.
Green under the 5x/all-browser stress gate; original Cucumber feature tagged @playwright so the Cucumber suite skips it.

Source: dashboard/test/ui/features/foundations/markdown_rendering.feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant