|
@@ -0,0 +1,17 @@
|
|
|
|
|
+import { readFileSync } from 'fs'
|
|
|
|
|
+import { resolve } from 'path'
|
|
|
|
|
+
|
|
|
|
|
+// 契约:task.childExpiryReminder(child 类型任务的过期未完成提醒支持)
|
|
|
|
|
+const TASK = resolve(__dirname, '../../../cfc-backend/src/main/java/com/etotem/cfc/task/TaskCheckinWebhookReminderTask.java')
|
|
|
|
|
+const source = readFileSync(TASK, 'utf8')
|
|
|
|
|
+
|
|
|
|
|
+describe('child 任务过期提醒', () => {
|
|
|
|
|
+ test('查询不再限定 executor_type=parent(或同时覆盖 child)', () => {
|
|
|
|
|
+ // 不应再有 .eq(Task::getExecutorType, "parent") 的硬过滤
|
|
|
|
|
+ expect(source).not.toMatch(/\.eq\(Task::getExecutorType,\s*"parent"\)/)
|
|
|
|
|
+ })
|
|
|
|
|
+ test('child 任务通过 family_members 反查 userId', () => {
|
|
|
|
|
+ expect(source).toMatch(/FamilyMemberMapper/)
|
|
|
|
|
+ expect(source).toMatch(/getFamilyMemberId|getExecutorType/)
|
|
|
|
|
+ })
|
|
|
|
|
+})
|