-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Improve testing of markdown.contains_backend_only_syntax() #1857
Comments
@timabbott Think so. I will start working on this from next week. Have midsems coming up in a few days. |
Cool, good luck with your midterms! |
Thanks 😄 |
@hackerkid have you had a chance to look at this? |
Yeah. I am working on #1653. |
Most of the side issues are now done, yay! The things that remain are:
|
@timabbott I was checking for some mismatches and found these two. I got them from the test cases in the function test_marked(frontend_tests/node_tests/echo.js). Text: Text: Is comparing the output of Marked and Bugdown enough (something like echo.apply_markdown(message) === response_data.rendered) for deciding whether or not to report via blueslip.warn? |
Well I think places where So, you're right, I guess I summarized the issue in a relatively simple fashion; our goal is to find and cut down on these divergences, and the |
@timabbott I will start with upgrading the marked. After that will I will move to fixing divergences and adding blueslip call. Is this workflow sounds fine? |
Yep that sounds great! |
@hackerkid is there more work that we want to do on this issue, or should we close it? |
@timabbott I am not entirely sure about that. We had a discussion regarding this here. https://chat.zulip.org/#narrow/stream/backend/topic/user-mention |
Yeah, OK, there's more to do. It might be worth using |
@timabbott Sure! |
This and the preceeding commits is significant progress towards completing #1857.
I did some work on this in 0161671 and the few commits before it. |
I think basically everything we had in mind here is done. I'm pretty happy with the current testing system, and I think we decided the I'm going to open issues for some follow-up projects, though. |
Opened #7099 for the main follow-up. |
Currently,
echo.contains_bugdown
does a pretty good job of checking what bugdown is supported, but there are a few gaps.However, we have some more obscure markdown features (e.g.
!modal_link()
) that are not checked for in the file. We have some test data inzerver/fixtures/markdown_test_cases.json
as well as tests inzerver/tests/test_bugdown.py
and frontend tests infrontend_tests/node_tests/echo.js
. The test fixture data is preferred for new tests, since it is automated tested in both the test_bugdown and echo.js test suites.We should do a few things:
(1) Document the above notes on how we test bugdown in docs/markdown.md
(2) Fill the gaps where
markdown.contains_backend_only_syntax
does not produce correct output, and add tests for this. The things I'm aware of include!modal_link
and friends (see the issues below)(3) Add a
blueslip.warn
call to report to the server whenever the local echo support ends up discovering a mismatch between marked and bugdown, so that we can catch future mismatches and fix or test them.Some related issues / open PRs that may make sense to work on as part of this include:
@hackerkid is that enough info to get started on improving this area of Zulip?
The text was updated successfully, but these errors were encountered: