Skip to content

Conversation

@mihai-albu-sage
Copy link
Contributor

@mihai-albu-sage mihai-albu-sage commented Jan 27, 2026

WIP

Proposed behaviour

The TestEditor component, which was introduced to support Jest unit tests for TextEditor, has been removed. Tests now use TextEditor directly or wrap it with LexicalComposer where appropriate, while maintaining 100% code coverage.

In addition, multiple Playwright tests have been added for TextEditor to ensure its behavior is validated in a real browser environment. Some of the unit tests that were flaky and not required for the 100% code coverage have been moved to Playwright tests.

Current behaviour

Currently, the TestEditor component is used to support Jest unit tests, however, this approach is not always ideal, as it relies on a simplified version of the actual component. The Playwright tests can be improved to cover more functionality even if there is some overlap with the jest unit tests.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant