|
@@ -1,10 +1,7 @@
|
|
|
package cn.yunzhixue.ability.center.examsprint.infrastructure.report.rendering.achievement;
|
|
package cn.yunzhixue.ability.center.examsprint.infrastructure.report.rendering.achievement;
|
|
|
|
|
|
|
|
-import cn.yunzhixue.ability.center.examsprint.contracts.report.AchievementExamSprintReportPayload;
|
|
|
|
|
import cn.yunzhixue.ability.center.examsprint.domain.report.AchievementReportContent;
|
|
import cn.yunzhixue.ability.center.examsprint.domain.report.AchievementReportContent;
|
|
|
import cn.yunzhixue.ability.center.examsprint.domain.report.ReportType;
|
|
import cn.yunzhixue.ability.center.examsprint.domain.report.ReportType;
|
|
|
-import com.fasterxml.jackson.databind.JsonNode;
|
|
|
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
import java.time.Instant;
|
|
import java.time.Instant;
|
|
@@ -16,7 +13,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
class ClasspathAchievementExamSprintReportRendererTest {
|
|
class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
|
|
|
|
|
- private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
|
|
|
|
private static final Pattern SELF_CLOSING_RECT_PATTERN = Pattern.compile("<rect\\b[^>]*/>");
|
|
private static final Pattern SELF_CLOSING_RECT_PATTERN = Pattern.compile("<rect\\b[^>]*/>");
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -35,14 +31,22 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
"vocabulary-growth-chart",
|
|
"vocabulary-growth-chart",
|
|
|
"训练前词汇量:<span class=\"highlight\">2328 词</span><br/>",
|
|
"训练前词汇量:<span class=\"highlight\">2328 词</span><br/>",
|
|
|
"训练后词汇量:<span class=\"highlight\">2347 词</span><br/>",
|
|
"训练后词汇量:<span class=\"highlight\">2347 词</span><br/>",
|
|
|
- "本次提升:<span class=\"highlight\">+19 词</span>");
|
|
|
|
|
|
|
+ "本次提升:<span class=\"highlight\">+19 词</span>",
|
|
|
|
|
+ "高考词汇量:<span class=\"highlight\">3500 词</span><br/>",
|
|
|
|
|
+ "掌握率:<span class=\"highlight\">66.51% -> 67.06%</span><br/>",
|
|
|
|
|
+ "掌握率提升:<span class=\"highlight\">+0.55%</span>");
|
|
|
assertModuleUsesVerticalCard(
|
|
assertModuleUsesVerticalCard(
|
|
|
html,
|
|
html,
|
|
|
"<h2 class=\"section-title\">模块二:试卷熟词量对比</h2>",
|
|
"<h2 class=\"section-title\">模块二:试卷熟词量对比</h2>",
|
|
|
"paper-known-words-chart",
|
|
"paper-known-words-chart",
|
|
|
"训练前熟词量:<span class=\"highlight\">650 个</span><br/>",
|
|
"训练前熟词量:<span class=\"highlight\">650 个</span><br/>",
|
|
|
"训练后熟词量:<span class=\"highlight\">654 个</span><br/>",
|
|
"训练后熟词量:<span class=\"highlight\">654 个</span><br/>",
|
|
|
- "本次提升:<span class=\"highlight\">+4 个</span>");
|
|
|
|
|
|
|
+ "本次提升:<span class=\"highlight\">+4 个</span>",
|
|
|
|
|
+ "试卷标题:<span class=\"highlight\">2024真题</span><br/>",
|
|
|
|
|
+ "试卷总词量:<span class=\"highlight\">861 词</span><br/>",
|
|
|
|
|
+ "训练前/后生词:<span class=\"highlight\">207 个 -> 203 个</span><br/>",
|
|
|
|
|
+ "试卷词率:<span class=\"highlight\">75.49% -> 75.96%</span><br/>",
|
|
|
|
|
+ "试卷词率提升:<span class=\"highlight\">+0.62%</span>");
|
|
|
assertBarFill(extractChartSvg(html, "vocabulary-growth-chart"), "chart-bar chart-bar-before", "#448aff");
|
|
assertBarFill(extractChartSvg(html, "vocabulary-growth-chart"), "chart-bar chart-bar-before", "#448aff");
|
|
|
assertBarFill(extractChartSvg(html, "vocabulary-growth-chart"), "chart-bar chart-bar-after", "#448aff");
|
|
assertBarFill(extractChartSvg(html, "vocabulary-growth-chart"), "chart-bar chart-bar-after", "#448aff");
|
|
|
assertBarFill(extractChartSvg(html, "paper-known-words-chart"), "chart-bar chart-bar-before", "#34a853");
|
|
assertBarFill(extractChartSvg(html, "paper-known-words-chart"), "chart-bar chart-bar-before", "#34a853");
|
|
@@ -91,6 +95,9 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
.contains("成功减少生词:<span class=\"highlight\">4 个</span>")
|
|
.contains("成功减少生词:<span class=\"highlight\">4 个</span>")
|
|
|
.contains("class=\"word-list\"")
|
|
.contains("class=\"word-list\"")
|
|
|
.contains("class=\"word-item\">number</div>")
|
|
.contains("class=\"word-item\">number</div>")
|
|
|
|
|
+ .doesNotContain("193%")
|
|
|
|
|
+ .doesNotContain("1.93%%")
|
|
|
|
|
+ .doesNotContain("0.48倍倍")
|
|
|
.doesNotContain("cdn.jsdelivr.net")
|
|
.doesNotContain("cdn.jsdelivr.net")
|
|
|
.doesNotContain("echarts")
|
|
.doesNotContain("echarts")
|
|
|
.doesNotContain("<script")
|
|
.doesNotContain("<script")
|
|
@@ -132,6 +139,37 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
.doesNotContain("bear<script>");
|
|
.doesNotContain("bear<script>");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ void renderEscapesCallerDisplayFieldsAndDoesNotExpandInjectedPlaceholders() throws Exception {
|
|
|
|
|
+ ClasspathAchievementExamSprintReportRenderer renderer = new ClasspathAchievementExamSprintReportRenderer();
|
|
|
|
|
+ AchievementReportContent content = withStageAndTestPaperSummaries(
|
|
|
|
|
+ sampleContent(),
|
|
|
|
|
+ new AchievementReportContent.StageVocabularySummary(
|
|
|
|
|
+ "高考<script>alert(1)</script>",
|
|
|
|
|
+ "3500",
|
|
|
|
|
+ "66.51",
|
|
|
|
|
+ "67.06",
|
|
|
|
|
+ "+0.55"),
|
|
|
|
|
+ new AchievementReportContent.TestPaperVocabularySummary(
|
|
|
|
|
+ "{{hitWords}}<script>alert(2)</script>",
|
|
|
|
|
+ "861",
|
|
|
|
|
+ "207",
|
|
|
|
|
+ "203",
|
|
|
|
|
+ "75.49",
|
|
|
|
|
+ "75.96",
|
|
|
|
|
+ "+0.62"));
|
|
|
|
|
+
|
|
|
|
|
+ String html = renderer.render(content, Instant.parse("2026-04-25T08:00:00Z"));
|
|
|
|
|
+
|
|
|
|
|
+ assertThat(html)
|
|
|
|
|
+ .contains("高考<script>alert(1)</script>词汇量")
|
|
|
|
|
+ .contains("试卷标题:<span class=\"highlight\">{{hitWords}}<script>alert(2)</script></span><br/>")
|
|
|
|
|
+ .contains("class=\"word-item\">number</div>")
|
|
|
|
|
+ .doesNotContain("<script>alert(1)</script>")
|
|
|
|
|
+ .doesNotContain("<script>alert(2)</script>")
|
|
|
|
|
+ .doesNotContain("试卷标题:<span class=\"highlight\"><div class=\"word-item\">number</div>");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Test
|
|
@Test
|
|
|
void renderShowsEmptyStateWhenHitWordsAreEmpty() throws Exception {
|
|
void renderShowsEmptyStateWhenHitWordsAreEmpty() throws Exception {
|
|
|
ClasspathAchievementExamSprintReportRenderer renderer = new ClasspathAchievementExamSprintReportRenderer();
|
|
ClasspathAchievementExamSprintReportRenderer renderer = new ClasspathAchievementExamSprintReportRenderer();
|
|
@@ -229,6 +267,20 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
"650 个",
|
|
"650 个",
|
|
|
"654个",
|
|
"654个",
|
|
|
"+4 个"),
|
|
"+4 个"),
|
|
|
|
|
+ new AchievementReportContent.StageVocabularySummary(
|
|
|
|
|
+ content.stageVocabularySummary().stageName(),
|
|
|
|
|
+ "3500 词",
|
|
|
|
|
+ "66.51%",
|
|
|
|
|
+ "67.06%",
|
|
|
|
|
+ "+0.55%"),
|
|
|
|
|
+ new AchievementReportContent.TestPaperVocabularySummary(
|
|
|
|
|
+ content.testPaperVocabularySummary().testPaperTitle(),
|
|
|
|
|
+ "861 词",
|
|
|
|
|
+ "207 个",
|
|
|
|
|
+ "203个",
|
|
|
|
|
+ "75.49%",
|
|
|
|
|
+ "75.96%",
|
|
|
|
|
+ "+0.62%"),
|
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
|
"1.93%",
|
|
"1.93%",
|
|
|
"0.48倍",
|
|
"0.48倍",
|
|
@@ -248,6 +300,13 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
.contains("训练前熟词量:<span class=\"highlight\">650 个</span><br/>")
|
|
.contains("训练前熟词量:<span class=\"highlight\">650 个</span><br/>")
|
|
|
.contains("训练后熟词量:<span class=\"highlight\">654个</span><br/>")
|
|
.contains("训练后熟词量:<span class=\"highlight\">654个</span><br/>")
|
|
|
.contains("本次提升:<span class=\"highlight\">+4 个</span>")
|
|
.contains("本次提升:<span class=\"highlight\">+4 个</span>")
|
|
|
|
|
+ .contains("高考词汇量:<span class=\"highlight\">3500 词</span><br/>")
|
|
|
|
|
+ .contains("掌握率:<span class=\"highlight\">66.51% -> 67.06%</span><br/>")
|
|
|
|
|
+ .contains("掌握率提升:<span class=\"highlight\">+0.55%</span>")
|
|
|
|
|
+ .contains("试卷总词量:<span class=\"highlight\">861 词</span><br/>")
|
|
|
|
|
+ .contains("训练前/后生词:<span class=\"highlight\">207 个 -> 203个</span><br/>")
|
|
|
|
|
+ .contains("试卷词率:<span class=\"highlight\">75.49% -> 75.96%</span><br/>")
|
|
|
|
|
+ .contains("试卷词率提升:<span class=\"highlight\">+0.62%</span>")
|
|
|
.contains("class=\"hit-stat-value\">1.93%</div>")
|
|
.contains("class=\"hit-stat-value\">1.93%</div>")
|
|
|
.contains("class=\"hit-stat-value\">0.48倍</div>")
|
|
.contains("class=\"hit-stat-value\">0.48倍</div>")
|
|
|
.contains("class=\"hit-stat-value\">207 个</div>")
|
|
.contains("class=\"hit-stat-value\">207 个</div>")
|
|
@@ -259,6 +318,10 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
.doesNotContain("2347词 词")
|
|
.doesNotContain("2347词 词")
|
|
|
.doesNotContain("650 个 个")
|
|
.doesNotContain("650 个 个")
|
|
|
.doesNotContain("654个 个")
|
|
.doesNotContain("654个 个")
|
|
|
|
|
+ .doesNotContain("3500 词 词")
|
|
|
|
|
+ .doesNotContain("861 词 词")
|
|
|
|
|
+ .doesNotContain("66.51%%")
|
|
|
|
|
+ .doesNotContain("75.49%%")
|
|
|
.doesNotContain("207 个 个")
|
|
.doesNotContain("207 个 个")
|
|
|
.doesNotContain("203个 个");
|
|
.doesNotContain("203个 个");
|
|
|
}
|
|
}
|
|
@@ -280,6 +343,8 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
content.summaryMetrics().learningEfficiencyText()),
|
|
content.summaryMetrics().learningEfficiencyText()),
|
|
|
content.vocabularyComparison(),
|
|
content.vocabularyComparison(),
|
|
|
content.paperKnownWordsComparison(),
|
|
content.paperKnownWordsComparison(),
|
|
|
|
|
+ content.stageVocabularySummary(),
|
|
|
|
|
+ content.testPaperVocabularySummary(),
|
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
|
"Infinity",
|
|
"Infinity",
|
|
|
content.examUnknownWordsHitStatus().learningEfficiencyText(),
|
|
content.examUnknownWordsHitStatus().learningEfficiencyText(),
|
|
@@ -297,40 +362,29 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
.doesNotContain("class=\"hit-stat-value\">0%</div>");
|
|
.doesNotContain("class=\"hit-stat-value\">0%</div>");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private AchievementReportContent sampleContent() throws Exception {
|
|
|
|
|
- AchievementExamSprintReportPayload payload = OBJECT_MAPPER.treeToValue(
|
|
|
|
|
- samplePayloadJson(),
|
|
|
|
|
- AchievementExamSprintReportPayload.class
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ private AchievementReportContent sampleContent() {
|
|
|
return new AchievementReportContent(
|
|
return new AchievementReportContent(
|
|
|
- payload.studentName(),
|
|
|
|
|
- payload.reportTitle(),
|
|
|
|
|
- payload.reportSubtitle(),
|
|
|
|
|
- payload.completionTitle(),
|
|
|
|
|
- payload.completionSubtitle(),
|
|
|
|
|
|
|
+ "吴泓妤",
|
|
|
|
|
+ "高考英语临考突击学习成果报告",
|
|
|
|
|
+ "2024真题 · 两周专项训练 · 真实提分效果",
|
|
|
|
|
+ "恭喜完成两周考前突击专项训练",
|
|
|
|
|
+ "基于2024英语真题试卷 · 真实学习效果分析",
|
|
|
new AchievementReportContent.SummaryMetrics(
|
|
new AchievementReportContent.SummaryMetrics(
|
|
|
- payload.summaryMetrics().vocabularyGrowthText(),
|
|
|
|
|
- payload.summaryMetrics().paperKnownWordsGrowthText(),
|
|
|
|
|
- payload.summaryMetrics().unknownWordHitRateText(),
|
|
|
|
|
- payload.summaryMetrics().learningEfficiencyText()),
|
|
|
|
|
- comparison(payload.vocabularyComparison()),
|
|
|
|
|
- comparison(payload.paperKnownWordsComparison()),
|
|
|
|
|
|
|
+ "+19",
|
|
|
|
|
+ "+4",
|
|
|
|
|
+ "0.0193",
|
|
|
|
|
+ "0.48"),
|
|
|
|
|
+ new AchievementReportContent.Comparison(2328.0, 2347.0, "2328", "2347", "+19"),
|
|
|
|
|
+ new AchievementReportContent.Comparison(650.0, 654.0, "650", "654", "+4"),
|
|
|
|
|
+ new AchievementReportContent.StageVocabularySummary("高考", "3500", "66.51", "67.06", "+0.55"),
|
|
|
|
|
+ new AchievementReportContent.TestPaperVocabularySummary("2024真题", "861", "207", "203", "75.49", "75.96", "+0.62"),
|
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
|
- payload.examUnknownWordsHitStatus().unknownWordHitRateText(),
|
|
|
|
|
- payload.examUnknownWordsHitStatus().learningEfficiencyText(),
|
|
|
|
|
- payload.examUnknownWordsHitStatus().unknownWordsBeforeText(),
|
|
|
|
|
- payload.examUnknownWordsHitStatus().unknownWordsAfterText(),
|
|
|
|
|
- payload.examUnknownWordsHitStatus().reducedUnknownWordsText(),
|
|
|
|
|
- payload.examUnknownWordsHitStatus().hitWords()));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- private AchievementReportContent.Comparison comparison(AchievementExamSprintReportPayload.Comparison comparison) {
|
|
|
|
|
- return new AchievementReportContent.Comparison(
|
|
|
|
|
- comparison.beforeValue(),
|
|
|
|
|
- comparison.afterValue(),
|
|
|
|
|
- comparison.beforeText(),
|
|
|
|
|
- comparison.afterText(),
|
|
|
|
|
- comparison.growthText());
|
|
|
|
|
|
|
+ "0.0193",
|
|
|
|
|
+ "0.48",
|
|
|
|
|
+ "207",
|
|
|
|
|
+ "203",
|
|
|
|
|
+ "4",
|
|
|
|
|
+ List.of("number", "bear", "popular", "importance")));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private AchievementReportContent withReportTitle(AchievementReportContent content, String reportTitle) {
|
|
private AchievementReportContent withReportTitle(AchievementReportContent content, String reportTitle) {
|
|
@@ -343,6 +397,8 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
content.summaryMetrics(),
|
|
content.summaryMetrics(),
|
|
|
content.vocabularyComparison(),
|
|
content.vocabularyComparison(),
|
|
|
content.paperKnownWordsComparison(),
|
|
content.paperKnownWordsComparison(),
|
|
|
|
|
+ content.stageVocabularySummary(),
|
|
|
|
|
+ content.testPaperVocabularySummary(),
|
|
|
content.examUnknownWordsHitStatus());
|
|
content.examUnknownWordsHitStatus());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -357,6 +413,8 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
content.summaryMetrics(),
|
|
content.summaryMetrics(),
|
|
|
vocabularyComparison,
|
|
vocabularyComparison,
|
|
|
content.paperKnownWordsComparison(),
|
|
content.paperKnownWordsComparison(),
|
|
|
|
|
+ content.stageVocabularySummary(),
|
|
|
|
|
+ content.testPaperVocabularySummary(),
|
|
|
content.examUnknownWordsHitStatus());
|
|
content.examUnknownWordsHitStatus());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -371,6 +429,8 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
content.summaryMetrics(),
|
|
content.summaryMetrics(),
|
|
|
content.vocabularyComparison(),
|
|
content.vocabularyComparison(),
|
|
|
content.paperKnownWordsComparison(),
|
|
content.paperKnownWordsComparison(),
|
|
|
|
|
+ content.stageVocabularySummary(),
|
|
|
|
|
+ content.testPaperVocabularySummary(),
|
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
new AchievementReportContent.ExamUnknownWordsHitStatus(
|
|
|
hitStatus.unknownWordHitRateText(),
|
|
hitStatus.unknownWordHitRateText(),
|
|
|
hitStatus.learningEfficiencyText(),
|
|
hitStatus.learningEfficiencyText(),
|
|
@@ -380,43 +440,22 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
hitWords));
|
|
hitWords));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private JsonNode samplePayloadJson() throws Exception {
|
|
|
|
|
- return OBJECT_MAPPER.readTree("""
|
|
|
|
|
- {
|
|
|
|
|
- "reportTitle": "高考英语临考突击学习成果报告",
|
|
|
|
|
- "reportSubtitle": "2024真题 · 两周专项训练 · 真实提分效果",
|
|
|
|
|
- "completionTitle": "恭喜完成两周考前突击专项训练",
|
|
|
|
|
- "completionSubtitle": "基于2024英语真题试卷 · 真实学习效果分析",
|
|
|
|
|
- "summaryMetrics": {
|
|
|
|
|
- "vocabularyGrowthText": "+19",
|
|
|
|
|
- "paperKnownWordsGrowthText": "+4",
|
|
|
|
|
- "unknownWordHitRateText": "0.0193",
|
|
|
|
|
- "learningEfficiencyText": "0.48"
|
|
|
|
|
- },
|
|
|
|
|
- "vocabularyComparison": {
|
|
|
|
|
- "beforeValue": 2328,
|
|
|
|
|
- "afterValue": 2347,
|
|
|
|
|
- "beforeText": "2328",
|
|
|
|
|
- "afterText": "2347",
|
|
|
|
|
- "growthText": "+19"
|
|
|
|
|
- },
|
|
|
|
|
- "paperKnownWordsComparison": {
|
|
|
|
|
- "beforeValue": 650,
|
|
|
|
|
- "afterValue": 654,
|
|
|
|
|
- "beforeText": "650",
|
|
|
|
|
- "afterText": "654",
|
|
|
|
|
- "growthText": "+4"
|
|
|
|
|
- },
|
|
|
|
|
- "examUnknownWordsHitStatus": {
|
|
|
|
|
- "unknownWordHitRateText": "0.0193",
|
|
|
|
|
- "learningEfficiencyText": "0.48",
|
|
|
|
|
- "unknownWordsBeforeText": "207",
|
|
|
|
|
- "unknownWordsAfterText": "203",
|
|
|
|
|
- "reducedUnknownWordsText": "4",
|
|
|
|
|
- "hitWords": ["number", "bear", "popular", "importance"]
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- """);
|
|
|
|
|
|
|
+ private AchievementReportContent withStageAndTestPaperSummaries(
|
|
|
|
|
+ AchievementReportContent content,
|
|
|
|
|
+ AchievementReportContent.StageVocabularySummary stageVocabularySummary,
|
|
|
|
|
+ AchievementReportContent.TestPaperVocabularySummary testPaperVocabularySummary) {
|
|
|
|
|
+ return new AchievementReportContent(
|
|
|
|
|
+ content.studentName(),
|
|
|
|
|
+ content.reportTitle(),
|
|
|
|
|
+ content.reportSubtitle(),
|
|
|
|
|
+ content.completionTitle(),
|
|
|
|
|
+ content.completionSubtitle(),
|
|
|
|
|
+ content.summaryMetrics(),
|
|
|
|
|
+ content.vocabularyComparison(),
|
|
|
|
|
+ content.paperKnownWordsComparison(),
|
|
|
|
|
+ stageVocabularySummary,
|
|
|
|
|
+ testPaperVocabularySummary,
|
|
|
|
|
+ content.examUnknownWordsHitStatus());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void assertModuleUsesVerticalCard(
|
|
private void assertModuleUsesVerticalCard(
|
|
@@ -425,7 +464,8 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
String chartClass,
|
|
String chartClass,
|
|
|
String beforeLine,
|
|
String beforeLine,
|
|
|
String afterLine,
|
|
String afterLine,
|
|
|
- String growthLine) {
|
|
|
|
|
|
|
+ String growthLine,
|
|
|
|
|
+ String... additionalLines) {
|
|
|
int sectionStart = html.indexOf(sectionTitle);
|
|
int sectionStart = html.indexOf(sectionTitle);
|
|
|
assertThat(sectionStart)
|
|
assertThat(sectionStart)
|
|
|
.as("module section should exist: %s", sectionTitle)
|
|
.as("module section should exist: %s", sectionTitle)
|
|
@@ -450,6 +490,9 @@ class ClasspathAchievementExamSprintReportRendererTest {
|
|
|
beforeLine,
|
|
beforeLine,
|
|
|
afterLine,
|
|
afterLine,
|
|
|
growthLine);
|
|
growthLine);
|
|
|
|
|
+ assertThat(sectionHtml)
|
|
|
|
|
+ .as("%s should include supplemental caller payload fields", sectionTitle)
|
|
|
|
|
+ .contains(additionalLines);
|
|
|
|
|
|
|
|
int cardIndex = sectionHtml.indexOf("<div class=\"card\">");
|
|
int cardIndex = sectionHtml.indexOf("<div class=\"card\">");
|
|
|
int chartBoxIndex = sectionHtml.indexOf(chartBox, Math.max(cardIndex, 0));
|
|
int chartBoxIndex = sectionHtml.indexOf(chartBox, Math.max(cardIndex, 0));
|