Skip to content

Commit

Permalink
Add navigation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloGracia committed Nov 6, 2024
1 parent 05feba8 commit c196e80
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/navigation/ayuda-psicologica.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 "Ayuda Psicologica" page ', async ({ page }) => {
await page.goto('/');
await page.click('text=Ayuda Psicológica');
await expect(page).toHaveURL('https://ayudana.org/');
await expect(page.locator('h1:has-text("Ayuda psicológica")')).toHaveText(
'Ayuda psicológica gratuita a los afectados por la Dana de Valencia',
);
});
10 changes: 10 additions & 0 deletions tests/navigation/compartir-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 "Compartir coche" page ', async ({ page }) => {
await page.goto('/');
await page.click('text=Compartir Coche');
await expect(page).toHaveURL('https://anem.guruwalk.com/');
await expect(page.locator('h2:has-text("Comparte")')).toHaveText(
'Comparte coche con quien no tiene y alivia el tráfico de la ciudad.',
);
});
10 changes: 10 additions & 0 deletions tests/navigation/reclamacion-consorcio.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 "Reclamar a Consorcio" page ', async ({ page }) => {
await page.goto('/');
await page.click('text=Reclamar a Consorcio');
await expect(page).toHaveURL(
'https://www.consorseguros.es/ambitos-de-actividad/seguros-de-riesgos-extraordinarios/solicitud-de-indemnizacion',
);
await expect(page.locator('h2:has-text("Abono")')).toHaveText('Abono de la indemnización');
});
12 changes: 12 additions & 0 deletions tests/navigation/servicio-notarial.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { test, expect } from '@playwright/test';

test('should navigate to the "Servicio Notarial" page ', async ({ page }) => {
await page.goto('/');
await page.click('text=Servicio Notarial');
await expect(page).toHaveURL(
'https://valencia.notariado.org/portal/-/20241031-servicio-notarial-de-ayuda-gratuito-para-los-afectados-por-la-dana-noticia-p%C3%BAblica-',
);
await expect(page.locator('h2:has-text("DANA")')).toHaveText(
'Habilitado un servicio notarial gratuito de ayuda para los afectados por la DANA',
);
});

0 comments on commit c196e80

Please sign in to comment.