Skip to content

Commit 98f0be2

Browse files
committed
content test: Use ContentExample for quotations; add widget smoke test
1 parent 9a855d6 commit 98f0be2

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

test/model/content_test.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ class ContentExample {
118118
const ImageEmojiNode(
119119
src: '/static/generated/emoji/images/emoji/unicode/zulip.png', alt: ':zulip:'));
120120

121+
static const quotation = ContentExample(
122+
'quotation',
123+
"```quote\nwords\n```",
124+
expectedText: 'words',
125+
'<blockquote>\n<p>words</p>\n</blockquote>', [
126+
QuotationNode([ParagraphNode(links: null, nodes: [TextNode('words')])])
127+
]);
128+
121129
static const codeBlockPlain = ContentExample(
122130
'code block without syntax highlighting',
123131
"```\nverb\natim\n```",
@@ -557,11 +565,7 @@ void main() {
557565
])]);
558566
});
559567

560-
testParse('parse quotations',
561-
// "```quote\nwords\n```"
562-
'<blockquote>\n<p>words</p>\n</blockquote>', const [
563-
QuotationNode([ParagraphNode(links: null, nodes: [TextNode('words')])]),
564-
]);
568+
testParseExample(ContentExample.quotation);
565569

566570
testParseExample(ContentExample.codeBlockPlain);
567571
testParseExample(ContentExample.codeBlockHighlightedShort);

test/widgets/content_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ void main() {
7171
});
7272
});
7373

74+
testContentSmoke(ContentExample.quotation);
75+
7476
group("CodeBlock", () {
7577
testContentSmoke(ContentExample.codeBlockPlain);
7678
testContentSmoke(ContentExample.codeBlockHighlightedShort);

0 commit comments

Comments
 (0)