Skip to content

Commit f3c86aa

Browse files
committed
content test [nfc]: Move an unsupported-KaTeX test into its group
1 parent 67ded9f commit f3c86aa

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/widgets/content_test.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,21 +1028,21 @@ void main() {
10281028
});
10291029
});
10301030

1031-
testWidgets('maintains font-size ratio with surrounding text, when falling back to TeX source', (tester) async {
1032-
const unsupportedHtml = '<span class="katex">'
1033-
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>λ</mi></mrow>'
1034-
'<annotation encoding="application/x-tex"> \\lambda </annotation></semantics></math></span>'
1035-
'<span class="katex-html" aria-hidden="true">'
1036-
'<span class="base unknown">' // Server doesn't generate this 'unknown' class.
1037-
'<span class="strut" style="height:0.6944em;"></span>'
1038-
'<span class="mord mathnormal">λ</span></span></span></span>';
1039-
await checkFontSizeRatio(tester,
1040-
targetHtml: unsupportedHtml,
1041-
targetFontSizeFinder: mkTargetFontSizeFinderFromPattern(r'\lambda'));
1042-
});
1043-
10441031
group('fallback to displaying KaTeX source if unsupported KaTeX HTML', () {
10451032
testContentSmoke(ContentExample.mathInlineUnknown);
1033+
1034+
testWidgets('maintains font-size ratio with surrounding text, when falling back to TeX source', (tester) async {
1035+
const unsupportedHtml = '<span class="katex">'
1036+
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>λ</mi></mrow>'
1037+
'<annotation encoding="application/x-tex"> \\lambda </annotation></semantics></math></span>'
1038+
'<span class="katex-html" aria-hidden="true">'
1039+
'<span class="base unknown">' // Server doesn't generate this 'unknown' class.
1040+
'<span class="strut" style="height:0.6944em;"></span>'
1041+
'<span class="mord mathnormal">λ</span></span></span></span>';
1042+
await checkFontSizeRatio(tester,
1043+
targetHtml: unsupportedHtml,
1044+
targetFontSizeFinder: mkTargetFontSizeFinderFromPattern(r'\lambda'));
1045+
});
10461046
});
10471047
});
10481048

0 commit comments

Comments
 (0)