Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add tests for createEditContent which mirror tests for createMessageContent. #10331

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

clokep
Copy link
Member

@clokep clokep commented Mar 8, 2023

Adds some tests for createEditContent. They're essentially the tests for createMessageContent with modifications to make sense for edits. This PR has no behavior changes for real code.

I want to add additional tests here for #9983, but split out some basic tests first since those are unrelated (and unchanged).

Note that the last test kind of gives unexpected behavior, but I made it pass by adding the content which matrix-react-sdk generates, instead of the expected content a user would want. I don't see an open bug for this (maybe introduced in #3893 though?) and attempted to fix it quickly but did not have success.

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@clokep clokep added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Mar 8, 2023
@clokep clokep marked this pull request as ready for review March 8, 2023 17:22
@clokep clokep requested a review from a team as a code owner March 8, 2023 17:22
Copy link
Contributor

@florianduros florianduros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tests!

FYI, a rich text editor is also available on the labs (which should replace this composer in the futur)

@germain-gg germain-gg merged commit aca077c into matrix-org:develop Mar 9, 2023
@clokep clokep deleted the edit-tests branch March 9, 2023 12:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants