feat: roles SPA Users, Profile, API keys, Activity
This commit is contained in:
1 parent
3db490a615
commit
34dffe222f
98 files changed
+4957
-434
No files matched your search
@@ -61,3 +61,39 @@ describe('Roles screens copy', () => {
|
||||
expect(t('Roles')).toBe('Rôles')
|
||||
})
|
||||
})
|
||||
|
||||
const USERS_ROLES_KEYS = [
|
||||
'Assigned by {0}',
|
||||
'Your role',
|
||||
'See what I can do',
|
||||
'What you can do',
|
||||
'A summary of your role, {0}. Read-only.',
|
||||
'Change role',
|
||||
'Change role for {0}',
|
||||
'Their API keys follow the new role.',
|
||||
'Transfer ownership to {0}',
|
||||
'Type {0} to confirm',
|
||||
'The email must match exactly.',
|
||||
"Keys follow their creator's role",
|
||||
'Follows role',
|
||||
'What changed',
|
||||
'Role {0} created',
|
||||
'Role {0} edited',
|
||||
'Role {0} deleted',
|
||||
"{0}'s role changed from {1} to {2}",
|
||||
'Ownership transferred from {0} to {1}',
|
||||
'They get an email with a link to set a password.',
|
||||
'Writer is the default. You can change a role later.',
|
||||
] as const
|
||||
|
||||
describe('Users, Profile, API keys and Activity copy for roles', () => {
|
||||
it.each(USERS_ROLES_KEYS)('"%s" has a French entry', (key) => {
|
||||
expect((messages as Record<string, string>)[key]).toMatch(/\S/)
|
||||
})
|
||||
|
||||
it('renders "Assigned by {0}" in both languages', () => {
|
||||
expect(t('Assigned by {0}', ['Marta Alves'])).toBe('Assigned by Marta Alves')
|
||||
setLocale('fr')
|
||||
expect(t('Assigned by {0}', ['Marta Alves'])).toBe('Attribué par Marta Alves')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user