From 9c00dbb2b14bad4812caf326e09ccdf49101a8ab Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Wed, 5 Feb 2025 01:19:35 +0530 Subject: [PATCH] test: update test cases Signed-off-by: K.B.Dharun Krishna --- crates/crates_io_markdown/lib.rs | 30 +++++++++++------------ tests/acceptance/readme-rendering-test.js | 10 -------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/crates/crates_io_markdown/lib.rs b/crates/crates_io_markdown/lib.rs index b3ec061d0c1..6e37246b956 100644 --- a/crates/crates_io_markdown/lib.rs +++ b/crates/crates_io_markdown/lib.rs @@ -676,26 +676,26 @@ There can also be some text in between! #[test] fn markdown_alerts() { let text = "> [!note]\n> Something of note"; - assert_snapshot!(markdown_to_html(text, None, ""), @r#" + assert_snapshot!(markdown_to_html(text, None, ""), @r##"
-

Note

-

Something of note

+

Note

+

Something of note

- "#); + "##); } #[test] - fn markdown_multiline_block_quotes_complex() { + fn multiline_block_quotes() { let text = "Paragraph one\n\n>>>\nParagraph two\n\n- one\n- two\n>>>"; - assert_snapshot!(markdown_to_html(text, None, ""), @r#" -

Paragraph one

-
-

Paragraph two

-
    -
  • one
  • -
  • two
  • -
-
- "#); + assert_snapshot!(markdown_to_html(text, None, ""), @r##" +

Paragraph one

+
+

Paragraph two

+
    +
  • one
  • +
  • two
  • +
+
+ "##); } } diff --git a/tests/acceptance/readme-rendering-test.js b/tests/acceptance/readme-rendering-test.js index f1e0996acfe..704f6ba3718 100644 --- a/tests/acceptance/readme-rendering-test.js +++ b/tests/acceptance/readme-rendering-test.js @@ -121,16 +121,6 @@ module('Acceptance | README rendering', function (hooks) { assert.dom('[data-test-readme] pre > code.language-rust.hljs').exists({ count: 2 }); assert.dom('[data-test-readme] pre > code.language-mermaid svg').exists(); - assert.dom('[data-test-readme] h3').includesText('GitHub Style Alert'); - assert.dom('[data-test-readme] .markdown-alert.markdown-alert-note').exists(); - assert.dom('[data-test-readme] .markdown-alert .markdown-alert-title').hasText('Note'); - assert.dom('[data-test-readme] .markdown-alert p:nth-of-type(2)').hasText('Something of note'); - - assert.dom('[data-test-readme] h3').includesText('GitLab Style Multiline Block Quotes'); - assert.dom('[data-test-readme] blockquote').exists(); - assert.dom('[data-test-readme] blockquote p').hasText('Paragraph two'); - assert.dom('[data-test-readme] blockquote ul > li').exists({ count: 2 }); - await percySnapshot(assert); });