fix(wiki): contain long ingredient codes on mobile
Deploy Canina / deploy (push) Successful in 2m10s

This commit is contained in:
devops committed 2026-10-17 11:24:36 +00:00
1 parent 80d9dc2f45
commit 5573bb3568
2 files changed
+17 -1

No files matched your search

@@ -290,4 +290,20 @@ describe('IngredientWiki Component', () => {
expect(container.firstElementChild).not.toHaveClass('py-12');
});
it('wraps long ingredient codes inside the mobile card', async () => {
(productService.getProducts as any).mockResolvedValueOnce({ data: [] });
(api.get as any).mockResolvedValueOnce({ data: [{
id: 'beef-broth-279-spray-dried',
slug: 'beef-broth-279-spray-dried',
nameFa: 'آب گوشت گاو',
description: 'توضیح',
benefits: [],
}] });
render(<IngredientWiki />);
await waitFor(() => expect(screen.getByText('آب گوشت گاو')).toBeInTheDocument());
expect(screen.getByTestId('wiki-ingredient-code')).toHaveClass('max-w-full', 'break-all');
});
});