- );
-}
diff --git a/components/primitives/__tests__/Carrusel.test.tsx b/components/primitives/__tests__/Carrusel.test.tsx
deleted file mode 100644
index f801919..0000000
--- a/components/primitives/__tests__/Carrusel.test.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { render, screen } from '@testing-library/react';
-import userEvent from '@testing-library/user-event';
-import { describe, it, expect } from 'vitest';
-import { Carrusel } from '../Carrusel';
-
-describe('', () => {
- it('renders every slide', () => {
- render(Uno
,
Dos
,
Tres
]} />);
- expect(screen.getByText('Uno')).toBeInTheDocument();
- expect(screen.getByText('Dos')).toBeInTheDocument();
- expect(screen.getByText('Tres')).toBeInTheDocument();
- });
- it('renders one position dot per slide, and marks the current one', () => {
- render(Uno,
Dos
]} />);
- const dots = screen.getAllByRole('button', { name: /ir a la tarjeta/i });
- expect(dots).toHaveLength(2);
- expect(dots[0]).toHaveAttribute('aria-current', 'true');
- });
- it('moves to a slide when its dot is clicked', async () => {
- const user = userEvent.setup();
- render(Uno,
Dos
]} />);
- const dots = screen.getAllByRole('button', { name: /ir a la tarjeta/i });
- await user.click(dots[1]);
- expect(dots[1]).toHaveAttribute('aria-current', 'true');
- });
- it('hides the dots entirely for a single slide', () => {
- render(Solo una]} />);
- expect(screen.queryByRole('button', { name: /ir a la tarjeta/i })).not.toBeInTheDocument();
- });
- it('exposes the slide group with the given accessible name', () => {
- render(Uno]} />);
- expect(screen.getByRole('group', { name: 'Frases de ejemplo' })).toBeInTheDocument();
- });
- it('shows a numbered counter with prev/next arrows instead of dots when mostrarContador is set', () => {
- render(Uno,
Dos
,
Tres
]} />);
- expect(screen.getByText('01')).toBeInTheDocument();
- expect(screen.getByText(/\/ 03/)).toBeInTheDocument();
- expect(screen.getByRole('button', { name: 'Siguiente' })).toBeInTheDocument();
- expect(screen.getByRole('button', { name: 'Anterior' })).toBeInTheDocument();
- expect(screen.queryByRole('button', { name: /ir a la tarjeta/i })).not.toBeInTheDocument();
- });
- it('advances the counter when the next arrow is clicked', async () => {
- const user = userEvent.setup();
- render(Uno,
Dos
]} />);
- await user.click(screen.getByRole('button', { name: 'Siguiente' }));
- expect(screen.getByText('02')).toBeInTheDocument();
- });
-});
diff --git a/lib/motion.ts b/lib/motion.ts
index 843e111..b44978c 100644
--- a/lib/motion.ts
+++ b/lib/motion.ts
@@ -66,8 +66,7 @@ export const motionProps = (reduced: boolean) =>
// Cycles through `count` steps on its own (Mecanismo, ComoEmpezar): each
// manual change restarts the dwell timer, hovering pauses it, and it never
-// advances at all for reduced-motion users — same shape as the Carrusel
-// autoplay, for step indicators that aren't a carousel.
+// advances at all for reduced-motion users.
export function useAutoStep(count: number, intervalMs = 3500) {
const reduced = usePrefersReducedMotion();
const [active, setActive] = useState(0);