Skip to content

WIP: Test also CommonMark serialization - #3331

Closed
susnux wants to merge 2 commits into
mainfrom
feat/test-commonmark
Closed

WIP: Test also CommonMark serialization#3331
susnux wants to merge 2 commits into
mainfrom
feat/test-commonmark

Conversation

@susnux

Copy link
Copy Markdown
Contributor

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
@juliusknorrjuliusknorr added this to the Nextcloud 26 milestone Nov 9, 2022
@susnux
susnuxforce-pushed the feat/test-commonmark branch from 39037a7 to 3f8f45eCompareNovember 17, 2022 18:05
@cypress

cypressBot commented Nov 17, 2022

Copy link
Copy Markdown



Test summary

106000Flakiness3


Run details

ProjectText
StatusPassed
Commit1b6fb04ℹ️
StartedNov 17, 2022 6:10 PM
EndedNov 17, 2022 6:17 PM
Duration06:33 💡
OSLinux Ubuntu -
BrowserElectron 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

@blizzzblizzz mentioned this pull request Mar 7, 2023
@blizzzblizzz modified the milestones: Nextcloud 26, Nextcloud 27Mar 9, 2023
@blizzzblizzz mentioned this pull request May 17, 2023
@blizzzblizzz modified the milestones: Nextcloud 27, Nextcloud 28May 23, 2023
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
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
Copy Markdown
ContributorAuthor

I do not think we need this anymore ❓

@susnuxsusnux closed this Mar 14, 2024
@susnux
susnux deleted the feat/test-commonmark branch March 14, 2024 11:22
@juliusknorr

Copy link
Copy Markdown
Member

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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@susnux@juliusknorr@blizzz