feat: 对齐闲鱼续期流程并完善业务管理
对齐官方 WebSocket 批量握手、注册、心跳、ACK、同步恢复及运行时设备标识生命周期。 保留 Cookie 完整属性,接入静默续期和保存登录信息设置,并在凭证更新后重建账号连接。 完善订单与商品同步、卡券和通知渠道交互,更新前端品牌、时间展示及嵌入资源。 补充 Go 与前端回归测试,确保完整检查和生产构建通过。
This commit is contained in:
1 parent
3cc1d4094d
commit
d77c317452
69 files changed
+3169
-819
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { buildEmailChannelConfig, enableCustomSMTP, normalizeEmailChannelConfig } from './notificationEmailConfig';
|
||||
|
||||
describe('email notification SMTP modes', () => {
|
||||
test('recognizes legacy channel overrides as custom SMTP', () => {
|
||||
expect(normalizeEmailChannelConfig({ to_email: '[email protected]', smtp_server: 'legacy.example.com' }).use_custom_smtp).toBe(true);
|
||||
});
|
||||
|
||||
test('inherit mode removes every channel-level SMTP override', () => {
|
||||
expect(buildEmailChannelConfig({
|
||||
to_email: ' [email protected] ',
|
||||
use_custom_smtp: false,
|
||||
smtp_server: 'stale.example.com',
|
||||
smtp_use_tls: false,
|
||||
})).toEqual({ to_email: '[email protected]', use_custom_smtp: false });
|
||||
});
|
||||
|
||||
test('custom mode starts from a complete copy of system SMTP settings', () => {
|
||||
const result = enableCustomSMTP({ to_email: '[email protected]' }, {
|
||||
smtp_server: 'smtp.example.com',
|
||||
smtp_port: 465,
|
||||
smtp_user: '[email protected]',
|
||||
smtp_password: 'secret',
|
||||
smtp_use_tls: false,
|
||||
smtp_use_ssl: true,
|
||||
});
|
||||
expect(result).toMatchObject({
|
||||
use_custom_smtp: true,
|
||||
smtp_server: 'smtp.example.com',
|
||||
smtp_port: 465,
|
||||
smtp_from_address: '[email protected]',
|
||||
smtp_use_tls: false,
|
||||
smtp_use_ssl: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user