feat: v3.4.12 ticket iteration

Refund rollback, winery T+3, multi withdraw, mini-user store detail, dev plan batch edit and WeCom dispatch, support ticket edit/attachments/batch status, package imageUrl.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-04 23:53:31 +08:00
parent 71f508e02b
commit 4372018c09
34 changed files with 1032 additions and 86 deletions
@@ -0,0 +1,48 @@
import { describe, expect, it } from 'vitest';
import { validateSupportTicketStatusTransition } from './support-ticket';
describe('validateSupportTicketStatusTransition', () => {
it('allows DEVELOPING -> TESTING', () => {
expect(
validateSupportTicketStatusTransition('DEVELOPING', 'TESTING', {
linkedTaskCount: 1,
isSuperAdmin: true,
}).ok,
).toBe(true);
});
it('blocks PENDING_REVIEW -> DEVELOPING without tasks', () => {
expect(
validateSupportTicketStatusTransition('PENDING_REVIEW', 'DEVELOPING', {
linkedTaskCount: 0,
isSuperAdmin: true,
}).ok,
).toBe(false);
});
it('blocks rollback PASSED -> DEVELOPING', () => {
expect(
validateSupportTicketStatusTransition('PASSED', 'DEVELOPING', {
linkedTaskCount: 1,
isSuperAdmin: true,
}).ok,
).toBe(false);
});
it('requires super admin and reason for REJECTED', () => {
expect(
validateSupportTicketStatusTransition('DEVELOPING', 'REJECTED', {
linkedTaskCount: 1,
isSuperAdmin: false,
rejectReason: 'x',
}).ok,
).toBe(false);
expect(
validateSupportTicketStatusTransition('DEVELOPING', 'REJECTED', {
linkedTaskCount: 1,
isSuperAdmin: true,
rejectReason: '',
}).ok,
).toBe(false);
});
});