Files
gongxue-base/apps/admin/src/pages/IntegrationConfig/integration-config-form.integration.test.ts
wangziqi 375c7ec60b feat: refine admin forms, attendance and finance workflows
Squash merge PR #23.

Included changes:
- complete occupancy check-in required fields/default payload
- improve responsive admin management pages
- fix attendance edge cases and attendance period config
- refine wallet/finance-related workflow handling

Checks:
- npm run typecheck -w apps/admin
- npm run typecheck -w apps/server
2026-07-18 12:54:10 +00:00

24 lines
704 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildDingTalkConfigPayload, isAppSecretRequired } from './integration-config-form';
describe('DingTalk integration config form', () => {
it('requires AppSecret only for the first configuration', () => {
expect(isAppSecretRequired(false)).toBe(true);
expect(isAppSecretRequired(true)).toBe(false);
});
it('builds a manual-sync config without the retired startEnable flag', () => {
expect(
buildDingTalkConfigPayload({
corpId: 'ding-corp',
agentId: 'app-key',
appSecret: '',
}),
).toEqual({
corpId: 'ding-corp',
agentId: 'app-key',
appSecret: undefined,
});
});
});