fix(island,server): 连续圆角四角修正 + 叫人分紧急/普通两级
灵动岛圆角(用户反馈"左上角和右下角缺一块 / 圆角边缘割裂"): - squircle.ts 改为"每个角独立圆心 + 角度参数"的超椭圆采样(原本四角共用同一个偏移向量, 左上/右下被切掉一块);四角几何与 WinIsland 的连续超椭圆一致,r 与 h/2、w/2 自动收敛。 - verify:desktop 新增像素级断言「连续圆角四角一致」:从四角沿对角线找岛体边界, 四角步进必须两两一致(展开 15/15/15/15、紧急 14/14/14/14、胶囊 5/5/5/5), 并保留路径绕行 |winding|≈2π 断言(抓"角上往回折")。该断言即本次回归的守卫。 - 截图留档同时写入裁剪图与整窗图,便于人工复核角形。 叫人分紧急 / 普通两级(用户要求"叫人也分为紧急和普通"): - shared:CreateCallRequest 新增 urgent;紧急叫人 → URGENT(无视上课时段立即展开), 普通叫人(默认)→ HIGH(按普通通知排队)。 - desktop:isImmediate 只认 priority=URGENT,不再把 kind=call 一律视为立即消息; 普通叫人回到与普通通知相同的排队 / 隐藏 / 下课弹出路径。 - web:通知发布 → 叫人、学生管理 → 叫人 两个弹窗新增"级别"单选(默认普通)+ 联动提示文案。 验证:verify:e2e 135/135(新增普通 / 紧急叫人级别断言)、verify:web 20/20(新增级别单选断言)、 verify:desktop 59/59 + 离线复跑 53/53、typecheck / lint / format 全绿。
This commit is contained in:
1 parent
1b4dd14e4a
commit
0690546307
13 files changed
+553
-205
No files matched your search
@@ -567,6 +567,27 @@ async function main() {
|
||||
callByTeacher.status === 201 && callTitle.includes('请') && callTitle.includes('找'),
|
||||
`status=${callByTeacher.status} title="${callTitle}"`,
|
||||
);
|
||||
record(
|
||||
'普通叫人(默认)不是紧急级别:priority=HIGH,学生端按普通通知排队',
|
||||
callByTeacher.payload?.data?.priority === 'HIGH',
|
||||
`priority=${callByTeacher.payload?.data?.priority ?? '-'}(期望 HIGH)`,
|
||||
);
|
||||
|
||||
const urgentCall = await api('/calls', {
|
||||
method: 'POST',
|
||||
token: teacherToken,
|
||||
body: {
|
||||
classId,
|
||||
studentId: studentUser.id,
|
||||
quickPhrase: '请立刻到办公室',
|
||||
urgent: true,
|
||||
},
|
||||
});
|
||||
record(
|
||||
'紧急叫人(urgent=true → priority=URGENT,学生端无视上课时段立即展开)',
|
||||
urgentCall.status === 201 && urgentCall.payload?.data?.priority === 'URGENT',
|
||||
`status=${urgentCall.status} priority=${urgentCall.payload?.data?.priority ?? '-'}`,
|
||||
);
|
||||
|
||||
const callWithMessage = await api('/calls', {
|
||||
method: 'POST',
|
||||
@@ -591,9 +612,9 @@ async function main() {
|
||||
body: { classId, studentId: studentUser.id, quickPhrase: '请马上来一趟' },
|
||||
});
|
||||
record(
|
||||
'上课时段允许叫人(不受紧急通知 409 限制)',
|
||||
'上课时段允许叫人(普通叫人同样不受紧急通知 409 限制)',
|
||||
callDuringClass.status === 201,
|
||||
`status=${callDuringClass.status}`,
|
||||
`status=${callDuringClass.status} priority=${callDuringClass.payload?.data?.priority ?? '-'}`,
|
||||
);
|
||||
|
||||
const studentCalls = await api('/calls', {
|
||||
@@ -614,11 +635,11 @@ async function main() {
|
||||
);
|
||||
|
||||
// 清理:删除本次叫人产生的通知
|
||||
for (const created of [callByTeacher, callWithMessage, callDuringClass]) {
|
||||
for (const created of [callByTeacher, urgentCall, callWithMessage, callDuringClass]) {
|
||||
const id = created.payload?.data?.id;
|
||||
if (id) await api(`/notifications/${id}`, { method: 'DELETE', token: teacherToken });
|
||||
}
|
||||
record('清理叫人测试数据', true, '已删除 3 条叫人通知');
|
||||
record('清理叫人测试数据', true, '已删除 4 条叫人通知');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- 6.4 班级角色权限矩阵
|
||||
|
||||
Reference in new issue
Block a user