fix(planner): translate SwapSuggestionList copy to German
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ const baseProps = {
|
||||
describe('SwapSuggestionList', () => {
|
||||
it('renders the Replacing banner', () => {
|
||||
render(SwapSuggestionList, { props: baseProps });
|
||||
expect(screen.getByText(/Replacing/i)).toBeTruthy();
|
||||
expect(screen.getByText(/Wird ersetzt/i)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('renders old meal name with strikethrough', () => {
|
||||
@@ -32,7 +32,7 @@ describe('SwapSuggestionList', () => {
|
||||
|
||||
it('renders the easiest-first eyebrow label', () => {
|
||||
render(SwapSuggestionList, { props: baseProps });
|
||||
expect(screen.getByText(/easiest first/i)).toBeTruthy();
|
||||
expect(screen.getByText(/einfachste zuerst/i)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('renders all recipe names', () => {
|
||||
@@ -42,11 +42,11 @@ describe('SwapSuggestionList', () => {
|
||||
expect(screen.getByText('Mushroom risotto')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('clicking Pick calls onpick with recipeId and name', async () => {
|
||||
it('clicking Wählen calls onpick with recipeId and name', async () => {
|
||||
const onpick = vi.fn();
|
||||
const user = userEvent.setup();
|
||||
render(SwapSuggestionList, { props: { ...baseProps, onpick } });
|
||||
const buttons = screen.getAllByRole('button', { name: /Pick/i });
|
||||
const buttons = screen.getAllByRole('button', { name: /Wählen/i });
|
||||
await user.click(buttons[0]);
|
||||
expect(onpick).toHaveBeenCalledWith('r1', 'Quick carbonara');
|
||||
});
|
||||
@@ -68,21 +68,21 @@ describe('SwapSuggestionList', () => {
|
||||
expect(screen.getByTestId('swap-empty-state')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('renders optional Cancel button when oncancel provided', () => {
|
||||
it('renders optional Abbrechen button when oncancel provided', () => {
|
||||
render(SwapSuggestionList, { props: { ...baseProps, oncancel: vi.fn() } });
|
||||
expect(screen.getByRole('button', { name: /Cancel/i })).toBeTruthy();
|
||||
expect(screen.getByRole('button', { name: /Abbrechen/i })).toBeTruthy();
|
||||
});
|
||||
|
||||
it('does not render Cancel button when oncancel not provided', () => {
|
||||
it('does not render Abbrechen button when oncancel not provided', () => {
|
||||
render(SwapSuggestionList, { props: baseProps });
|
||||
expect(screen.queryByRole('button', { name: /Cancel/i })).toBeNull();
|
||||
expect(screen.queryByRole('button', { name: /Abbrechen/i })).toBeNull();
|
||||
});
|
||||
|
||||
it('clicking Cancel calls oncancel', async () => {
|
||||
it('clicking Abbrechen calls oncancel', async () => {
|
||||
const oncancel = vi.fn();
|
||||
const user = userEvent.setup();
|
||||
render(SwapSuggestionList, { props: { ...baseProps, oncancel } });
|
||||
await user.click(screen.getByRole('button', { name: /Cancel/i }));
|
||||
await user.click(screen.getByRole('button', { name: /Abbrechen/i }));
|
||||
expect(oncancel).toHaveBeenCalledOnce();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user