Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Test also CommonMark serialization #3331

Closed
wants to merge 2 commits into from
Closed

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Oct 28, 2022

Summary

As two different markdown strings can be semantically the same, we can test if the resulting rendered HTML are syntactically equal.

Currently about hundred test cases fail because of a known limitation of prosemirror-markdown not able to serialize nested marks correctly, see ProseMirror/prosemirror-markdown#82

So the CI test results can be used as a reference for identifiying problem for #2702 and also what needs to be fixed so that markdown files stay unchanged (#593)

@susnux susnux marked this pull request as draft October 28, 2022 11:29
@juliushaertl juliushaertl added this to the Nextcloud 26 milestone Nov 9, 2022
@cypress
Copy link

cypress bot commented Nov 17, 2022



Test summary

106 0 0 0Flakiness 3


Run details

Project Text
Status Passed
Commit 1b6fb04 ℹ️
Started Nov 17, 2022 6:10 PM
Ended Nov 17, 2022 6:17 PM
Duration 06:33 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Flakiness

workspace.spec.js Flakiness
1 Workspace > formats text
sections.spec.js Flakiness
1 Content Sections > Heading anchors > Anchor scrolls into view
links.spec.js Flakiness
1 test link marks > link preview > shows a link preview

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

As two different markdown strings can be semantically the same,
we can test if the resulting rendered HTML are syntactically equal.

Currently about hundred test cases fail because of a known limitation of
`prosemirror-markdown` not able to serialize nested marks correctly, see
ProseMirror/prosemirror-markdown#82

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
The commonmark parsing tests are already done by markdownit,
as suche we only need to test serializing. And of cause parsing of
markdown extensions we added.

The current "CommonMark" testing also had quite a lot of hacks
as even if we are commonmark compatible we do not yield the same html
representation (html is only a interim stage to tiptap).

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Mar 14, 2024

I do not think we need this anymore ❓

@susnux susnux closed this Mar 14, 2024
@susnux susnux deleted the feat/test-commonmark branch March 14, 2024 11:22
@juliushaertl
Copy link
Member

I think we can revive when there is some more time to dive into the further markdown differences 👍

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

Successfully merging this pull request may close these issues.

3 participants