Skip to content

Commit

Permalink
Merge pull request #127 from ElCala/enlace_tu_coche_dana
Browse files Browse the repository at this point in the history
feat(Sidebar.js): add link to https://tucochedana.es/index.php/
  • Loading branch information
vsornosa1 authored Nov 7, 2024
2 parents aedc0d5 + ed31f45 commit fc8dd69
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/layout/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
Landmark,
Scale,
MessageCircleQuestion,
CarTaxiFront,
} from 'lucide-react';
import UserInfo from '../UserInfo';
import { useSession } from '../../context/SessionProvider';
Expand Down Expand Up @@ -125,13 +126,21 @@ const menuItems = [
isHref: true,
},
{
icon: Car,
icon: CarTaxiFront,
title: 'Compartir Coche',
description: 'Viaja u ofrece viajes con otros',
path: 'https://anem.guruwalk.com/',
color: 'text-amber-600',
isHref: true,
},
{
icon: Car,
title: 'Encontrar tu Coche',
description: 'Sistema de registro y consulta de vehículos perdidos',
path: 'https://tucochedana.es/index.php/',
color: 'text-blue-600',
isHref: true,
},
];

export default function Sidebar({ isOpen, toggle }) {
Expand Down Expand Up @@ -232,7 +241,7 @@ export default function Sidebar({ isOpen, toggle }) {
{/* Toggle button for desktop */}
<button
onClick={toggle}
className="hidden md:flex absolute -right-12 top-4 bg-white p-2 rounded-r-lg shadow-md
className="hidden md:flex absolute -right-12 top-4 bg-white p-2 rounded-r-lg shadow-md
hover:bg-gray-50 focus:outline-none group"
aria-label={isOpen ? 'Contraer menú' : 'Expandir menú'}
>
Expand Down
10 changes: 10 additions & 0 deletions tests/navigation/encuentra-coche.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { test, expect } from '@playwright/test';

test('should navigate to the "Encontrar tu Coche" page ', async ({ page }) => {
await page.goto('/');
await page.click('text=Encontrar tu Coche');
await expect(page).toHaveURL('https://tucochedana.es/index.php/');
await expect(page.locator('p:has-text("Sistema")')).toHaveText(
'Sistema de registro y consulta de vehículos perdidos.',
);
});

0 comments on commit fc8dd69

Please sign in to comment.