|
|
@@ -263,11 +263,13 @@ class ClasspathOutlookExamSprintReportRendererTest {
|
|
|
|
|
|
assertThat(html)
|
|
|
.contains("class='donut-mastered-full-circle'")
|
|
|
- .doesNotContain("class='donut-mastered-arc'");
|
|
|
+ .contains("class='chart-track' cx='110' cy='110' r='76' fill='none' stroke='#e8eef7' stroke-width='18'")
|
|
|
+ .doesNotContain("class='donut-mastered-arc'")
|
|
|
+ .doesNotContain("class='donut-unmastered-arc'");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 覆盖官方 payload 计算出的考纲掌握率为 0% 时,考纲已掌握弧线应被省略且未掌握弧线仍存在。
|
|
|
+ * 覆盖官方 payload 计算出的考纲掌握率为 0% 时,考纲已掌握弧线应被省略且仅保留完整浅色底环。
|
|
|
*/
|
|
|
@Test
|
|
|
void renderSkipsProgressArcWhenSyllabusPercentIsZeroOrBelow() throws Exception {
|
|
|
@@ -277,8 +279,24 @@ class ClasspathOutlookExamSprintReportRendererTest {
|
|
|
String html = renderer.render(unmodeledOutlookContent(payload), Instant.parse("2026-01-03T08:00:00Z"));
|
|
|
|
|
|
assertThat(html)
|
|
|
+ .contains("class='chart-track' cx='110' cy='110' r='76' fill='none' stroke='#e8eef7' stroke-width='18'")
|
|
|
.doesNotContain("class='donut-mastered-arc'")
|
|
|
- .contains("class='donut-unmastered-arc'");
|
|
|
+ .doesNotContain("class='donut-unmastered-arc'");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 覆盖考纲环形图的常规进度场景时,浅色未掌握部分应由完整底环表达,避免额外浅色圆头覆盖蓝色进度弧。
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ void renderSyllabusDonutUsesSingleTrackBehindProgressArc() throws Exception {
|
|
|
+ ClasspathOutlookExamSprintReportRenderer renderer = new ClasspathOutlookExamSprintReportRenderer(OBJECT_MAPPER);
|
|
|
+
|
|
|
+ String html = renderer.render(unmodeledOutlookContent(callerVocabularyPayload()), Instant.parse("2026-01-03T08:00:00Z"));
|
|
|
+
|
|
|
+ assertThat(html)
|
|
|
+ .contains("class='chart-track' cx='110' cy='110' r='76' fill='none' stroke='#e8eef7' stroke-width='18'")
|
|
|
+ .contains("class='donut-mastered-arc'")
|
|
|
+ .doesNotContain("class='donut-unmastered-arc'");
|
|
|
}
|
|
|
|
|
|
private static final class TrackingObjectMapper extends ObjectMapper {
|