11 lines
591 B
TypeScript
11 lines
591 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { credentialLabel } from '../src/components/AccountUsersPanel'
|
|
|
|
describe('account directory credential state', () => {
|
|
it('shows whether password is ready without legacy initialization labels', () => {
|
|
expect(credentialLabel({ initializationState: 'pending', passwordSet: false })).toBe('待设置密码')
|
|
expect(credentialLabel({ initializationState: 'initialized', passwordSet: true })).toBe('已设置密码')
|
|
expect(credentialLabel({ initializationState: 'legacy', passwordSet: false })).toBe('待设置密码')
|
|
})
|
|
})
|