fix: show full student summaries
This commit is contained in:
@@ -119,6 +119,38 @@ assertEqual("纠错后排序仍使用显示记录", value("currentRecordOrder.jo
|
||||
vm.runInContext("updateCorrectionToolbar('测试提交按钮')", context);
|
||||
assertEqual("提交审核按钮文案", value("submitCorrectionsBtn.textContent"), "提交审核 1 条");
|
||||
|
||||
vm.runInContext(
|
||||
`
|
||||
const longSummaryBody = "完整课程小结内容".repeat(20);
|
||||
currentRecords = [
|
||||
{
|
||||
date: "2026.06.14",
|
||||
weekday: "星期日",
|
||||
time: "10:00-11:00",
|
||||
student: "甲",
|
||||
duration: "1小时0分",
|
||||
duration_hours: 1,
|
||||
teacher: "王老师",
|
||||
subject: "英语",
|
||||
_recordIndex: 0,
|
||||
_recordKey: "summary-test",
|
||||
summary_count: 1,
|
||||
summaries: [{ title: "课程小结", body: longSummaryBody, teacher: "王老师", subject: "英语" }],
|
||||
},
|
||||
];
|
||||
expandedSummaryRecords = new Set(["summary-test"]);
|
||||
collapsedTeacherGroups = new Set();
|
||||
const summaryHtml = renderGroupedRecords(currentRecords);
|
||||
if (!summaryHtml.includes(longSummaryBody)) {
|
||||
throw new Error("课程小结展开后应直接显示完整正文");
|
||||
}
|
||||
if (summaryHtml.includes("展开全文") || summaryHtml.includes("summary-toggle") || summaryHtml.includes("summary-preview")) {
|
||||
throw new Error("课程小结展开后不应再渲染展开全文按钮或预览裁切");
|
||||
}
|
||||
`,
|
||||
context,
|
||||
);
|
||||
|
||||
const adminElements = new Map();
|
||||
function adminElement(id) {
|
||||
if (!adminElements.has(id)) {
|
||||
|
||||
Reference in New Issue
Block a user