diff --git a/frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.behavior.test.tsx b/frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.behavior.test.tsx index 9f8904c..b418847 100644 --- a/frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.behavior.test.tsx +++ b/frontend/admin/src/pages/admin/ProfileSecurityPage/ProfileSecurityPage.behavior.test.tsx @@ -192,8 +192,10 @@ vi.mock('@/services/operation-logs', () => ({ listMyOperationLogs: () => listMyOperationLogsMock(), })) +const contactBindingsSectionMock = vi.fn(() =>
) + vi.mock('./ContactBindingsSection', () => ({ - ContactBindingsSection: () => , + ContactBindingsSection: (props: unknown) => contactBindingsSectionMock(props), })) function buildDevice(id: number, name: string, status: 0 | 1, isTrusted = false): Device { @@ -318,6 +320,7 @@ describe('ProfileSecurityPage behavior', () => { created_at: '2026-03-27 09:10:00', }], }) + contactBindingsSectionMock.mockClear() vi.spyOn(window, 'getComputedStyle').mockImplementation((element) => { return originalGetComputedStyle.call(window, element) @@ -467,6 +470,24 @@ describe('ProfileSecurityPage behavior', () => { expect(message.success).toHaveBeenCalledWith('密码修改成功') }) + it('passes contact binding capabilities to ContactBindingsSection', async () => { + render(