Skip to content

Commit 187cae1

Browse files
committed
test: update README rendering test
Signed-off-by: K.B.Dharun Krishna <[email protected]>
1 parent 0e76b2a commit 187cae1

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

Diff for: tests/acceptance/readme-rendering-test.js

+27-16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import percySnapshot from '@percy/ember';
55
import { http, HttpResponse } from 'msw';
66

77
import { setupApplicationTest } from 'crates-io/tests/helpers';
8+
import { markdown_to_html } from 'crates-io/tests/';
89

910
import { visit } from '../helpers/visit-ignoring-abort';
1011

@@ -66,22 +67,6 @@ graph TD;
6667
C-->D;
6768
</code></pre>
6869
69-
<h3>GitHub Style Alert</h3>
70-
<div class="markdown-alert markdown-alert-note">
71-
<p class="markdown-alert-title">Note</p>
72-
<p>Something of note</p>
73-
</div>
74-
75-
<h3>GitLab Style Multiline Block Quotes</h3>
76-
<p>Paragraph one</p>
77-
<blockquote>
78-
<p>Paragraph two</p>
79-
<ul>
80-
<li>one</li>
81-
<li>two</li>
82-
</ul>
83-
</blockquote>
84-
8570
<ul>
8671
<li>
8772
<p>Delegate to a method with a different name</p>
@@ -98,6 +83,22 @@ graph TD;
9883
</li>
9984
</ul>
10085
86+
<h3>GitHub Style Alert</h3>
87+
<div class="markdown-alert markdown-alert-note">
88+
<p class="markdown-alert-title">Note</p>
89+
<p>Something of note</p>
90+
</div>
91+
92+
<h3>GitLab Style Multiline Block Quotes</h3>
93+
<p>Paragraph one</p>
94+
<blockquote>
95+
<p>Paragraph two</p>
96+
<ul>
97+
<li>one</li>
98+
<li>two</li>
99+
</ul>
100+
</blockquote>
101+
101102
<section class="footnotes">
102103
<ol>
103104
<li id="user-content-fn-1">
@@ -120,6 +121,16 @@ module('Acceptance | README rendering', function (hooks) {
120121
assert.dom('[data-test-readme] pre > code.language-rust.hljs').exists({ count: 2 });
121122
assert.dom('[data-test-readme] pre > code.language-mermaid svg').exists();
122123

124+
assert.dom('[data-test-readme] h3').includesText('GitHub Style Alert');
125+
assert.dom('[data-test-readme] .markdown-alert.markdown-alert-note').exists();
126+
assert.dom('[data-test-readme] .markdown-alert .markdown-alert-title').hasText('Note');
127+
assert.dom('[data-test-readme] .markdown-alert p:nth-of-type(2)').hasText('Something of note');
128+
129+
assert.dom('[data-test-readme] h3').includesText('GitLab Style Multiline Block Quotes');
130+
assert.dom('[data-test-readme] blockquote').exists();
131+
assert.dom('[data-test-readme] blockquote p').hasText('Paragraph two');
132+
assert.dom('[data-test-readme] blockquote ul > li').exists({ count: 2 });
133+
123134
await percySnapshot(assert);
124135
});
125136

0 commit comments

Comments
 (0)