Skip to content

E2E: code block markdown shortcut test fails content detection #79

@reddpy

Description

@reddpy

Description

The test Editor — Edge Cases › code block: markdown shortcut creates code block (e2e/editor.spec.ts:784) is failing.

Error

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  804 |       (c: any) => c.type === 'code' || c.type === 'code-block',
  805 |     );
> 806 |     expect(hasCode).toBe(true);

Root Cause

The test creates a code block via the ``` markdown shortcut, then inspects the serialized JSON content looking for a node with type === 'code' or type === 'code-block'. Neither type name matches the actual node type in the saved document, so the assertion fails.

Steps to Reproduce

pnpm exec playwright test -g "code block: markdown shortcut creates code block"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions