fix(editor): category creation dialog title key
This commit is contained in:
1 parent
baae13ce3a
commit
021685f6b3
4 files changed
+26
No files matched your search
@@ -1538,6 +1538,8 @@ export const en: Dict = {
|
||||
'editor.findings.add_category': 'Add a category',
|
||||
'editor.findings.add_node': 'Add a finding',
|
||||
'editor.findings.new.zone': 'New findings zone',
|
||||
// Provisional EN, pending the owner's wording.
|
||||
'editor.findings.new.category': 'New category',
|
||||
'editor.findings.new.category_in_zone': 'New category in the zone « {zone} »',
|
||||
'editor.findings.new.node': 'New finding',
|
||||
'editor.findings.kind': 'Category type',
|
||||
|
||||
@@ -1569,6 +1569,7 @@ export const fr: Dict = {
|
||||
'editor.findings.add_category': 'Ajouter une catégorie',
|
||||
'editor.findings.add_node': 'Ajouter un constat',
|
||||
'editor.findings.new.zone': 'Nouvelle zone de constats',
|
||||
'editor.findings.new.category': 'Nouvelle catégorie',
|
||||
'editor.findings.new.category_in_zone': 'Nouvelle catégorie dans la zone « {zone} »',
|
||||
'editor.findings.new.node': 'Nouveau constat',
|
||||
'editor.findings.kind': 'Type de catégorie',
|
||||
|
||||
@@ -543,3 +543,16 @@ describe('final review: leaving the editor with a dirty dialog (criterion 17)',
|
||||
expect(sessionStorage.getItem(flagKey)).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe('final review: the category creation title', () => {
|
||||
it('reads « Nouvelle catégorie », never a raw key', async () => {
|
||||
const user = await mount()
|
||||
await user.click(
|
||||
screen.getByRole('button', { name: 'Ajouter une catégorie' }),
|
||||
)
|
||||
await waitFor(() => expect(findingDialog()).not.toBeNull())
|
||||
const title = within(findingDialog()!).getByRole('heading', { level: 2 })
|
||||
expect(title).toHaveTextContent(/^Nouvelle catégorie$/)
|
||||
expect(title.textContent).not.toContain('editor.')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user