Fetch product images and cycle them with Next and Previous

Build an image slider component that shows product images fetched from an API. Users move through the images with “Next” and “Previous” buttons, with a smooth transition between slides.
https://dummyjson.com/products. The response looks like:
{
"products": [
{ "id": 1, "title": "...", "description": "...", "images": ["https://...", "https://..."] },
...
]
}
<img> whose src is the first URL in the product’s images array, with the description as its alt.description as visible text below the image.display: none, the hidden attribute, or aria-hidden="true".Data loads -> slide 1 of 4 is shown
Click "Next" -> slide 2
Click "Previous" -> slide 1
Click "Previous" -> slide 4 (wraps around)
Click "Next" -> slide 1 (wraps around)
The tests replace the API with fake products, click your buttons, and read the screen like a real user would. You don’t need test ids, specific class names, or an exact HTML structure. They only check that:
fetch with a URL that starts with https://dummyjson.com/products.<img> is shown, with the first URL of the current product’s images.