feat(frontend): i18n MITRE components (matrix modal, picker, field, tag)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,7 +124,7 @@ describe('MitreMatrixModal', () => {
|
||||
);
|
||||
await user.click(t1078Btn!);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /Apply/i }));
|
||||
await user.click(screen.getByRole('button', { name: /Appliquer/i }));
|
||||
|
||||
expect(onApply).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -148,7 +148,7 @@ describe('MitreMatrixModal', () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /Cancel/i }));
|
||||
await user.click(screen.getByRole('button', { name: /Fermer/i }));
|
||||
|
||||
expect(onCancel).toHaveBeenCalled();
|
||||
expect(onApply).not.toHaveBeenCalled();
|
||||
@@ -202,7 +202,7 @@ describe('MitreMatrixModal', () => {
|
||||
|
||||
await waitFor(() => screen.getByText('T1078'));
|
||||
|
||||
const searchInput = screen.getByPlaceholderText(/Filter techniques/i);
|
||||
const searchInput = screen.getByPlaceholderText(/Filtrer/i);
|
||||
await user.type(searchInput, 'T1059');
|
||||
|
||||
expect(screen.queryByText('T1078')).toBeNull();
|
||||
@@ -242,7 +242,7 @@ describe('MitreMatrixModal', () => {
|
||||
);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByRole('button', { name: /Apply 1 item/i })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: /Appliquer \(1 élément\)/i })).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -259,11 +259,11 @@ describe('MitreMatrixModal', () => {
|
||||
|
||||
await waitFor(() => screen.getByText('T1078'));
|
||||
|
||||
const applyBtn = screen.getByRole('button', { name: /Clear all/i });
|
||||
const applyBtn = screen.getByRole('button', { name: /Tout effacer/i });
|
||||
expect(applyBtn).toBeDisabled();
|
||||
});
|
||||
|
||||
it('Apply button shows "Clear all" and is enabled when initial selection is deselected', async () => {
|
||||
it('Apply button shows "Tout effacer" and is enabled when initial selection is deselected', async () => {
|
||||
const onApply = vi.fn();
|
||||
const user = userEvent.setup();
|
||||
|
||||
@@ -284,7 +284,7 @@ describe('MitreMatrixModal', () => {
|
||||
);
|
||||
await user.click(t1078Btn!);
|
||||
|
||||
const applyBtn = screen.getByRole('button', { name: /Clear all/i });
|
||||
const applyBtn = screen.getByRole('button', { name: /Tout effacer/i });
|
||||
expect(applyBtn).not.toBeDisabled();
|
||||
await user.click(applyBtn);
|
||||
expect(onApply).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user