SprilurTests Project

Exportació CSV del projecte amb format espanyol

Editar
/

Test validat correctament

L'script s'ha executat i ha passat després de 0 iteracions de refinament.

La IA ajustarà l'script segons el teu feedback i el validarà automàticament.

Prompt

Inicia sessió amb admin@sprilur.test i password. Navega a un projecte propi que tingui l'avaluació calculada a través de /es/projects/{id}/csv. Localitza i activa l'enllaç o botó d'exportació a CSV. Verifica que s'inicia una descàrrega d'un fitxer CSV. Comprova que el fitxer descarregat utilitza el format espanyol amb separador de camps ';' i separador decimal ','.

Pla de Test 3 pag · 12 passos · 6 validacions

Pàgines a visitar

/login Login page with email and password form
/dashboard My projects dashboard listing all owned projects
/es/projects/2 Results page for project 'Test' — 100% evaluated, score 81.4%, has Exportar datos link

Passos del test

Validacions

After login redirect, dashboard heading 'Mis proyectos' is visible h1
Project results page heading shows the project name 'Test' h1
'Exportar datos' CSV export link is visible on the project results page a[href$='/csv']
Clicking Exportar datos triggers a file download — download event fires and filename ends with .csv
Downloaded CSV file content uses semicolon ';' as field separator (Spanish format — not comma)
Downloaded CSV file content uses comma ',' as decimal separator in numeric values (e.g. '7,00' not '7.00')

Historial de validació 1 iteracions

#? FAIL

Passos del Test 4 steps

1

Navigate to login page

Navigate to the login page and capture initial state with form visible

stable (4x)
step3766-login-page

step3766 login page

1. navigate Navigate to the login page
2. screenshot Capture login page with form visible
2

Login with admin credentials

Fills login credentials (admin@sprilur.test/password), submits the form, waits for dashboard redirect, and captures the project list dashboard

stable (4x)
step3767-dashboard-projects-list

step3767 dashboard projects list

3. fill Enter admin email in the login form #login-email
4. fill Enter password in the login form #login-password
5. click Click the Entrar button to submit login button[type='submit']
6. wait Wait for dashboard heading to appear after login redirect h1
7. screenshot Capture dashboard with project list
After login redirect, dashboard heading 'Mis proyectos' is visible
Project results page heading shows the project name 'Test'
Generació inicial FAIL
#1 FAIL pas 5 · refine
El selector coincideix amb més d'un element — cal afinar-lo perquè sigui únic.
locator.click: Error: strict mode violation: locator('button[type="submit"]') resolved to 2 elements: 1) <button typ... [veure tot] locator.click: Error: strict mode violation: locator('button[type="submit"]') resolved to 2 elements: 1) <button type="submit" class="inline-flex border-2 border-[#c8102e] px-7 py-3 text-sm font-bold uppercase tracking-wide text-zinc-700 transition hover:bg-[#c8102e] hover:text-white">↵ Entrar↵ </button> aka getByRole('button', { name: 'Entrar' }) 2) <button type="submit" class="inline-flex border-2 border-[#c8102e] px-7 py-3 text-sm font-bold uppercase tracking-wide text-zinc-700 transition hover:bg-[#c8102e] hover:text-white">↵ Registrarse↵ </button> aka getByRole('button', { name: 'Registrarse' }) Call log: - waiting for locator('button[type="submit"]')
3

Click Test project results link and capture export page

Clicks the Resultados link for the Test project, waits for the project results page to load with the CSV export functionality visible, and captures a screenshot showing the export button and evaluation data.

stable (4x)
step3768-project-results-export-page

step3768 project results export page

8. click Click the Resultados link for the 'Test' project (100% complete, full evaluation calculated) a[href$='/es/projects/2']
9. wait Wait for project results page to load with CSV export link visible a[href$='/csv']
10. screenshot Capture project results page showing Exportar datos link and evaluation scores
'Exportar datos' CSV export link is visible on the project results page
Generació inicial FAIL
#2 FAIL pas 8 · refine
Temps d'espera exhaurit — l'element no es va trobar o la pàgina no va acabar de carregar.
locator.click: Timeout 30000ms exceeded. Call log: - waiting for locator('a[href$="/es/projects/2"]').first() [veure tot] locator.click: Timeout 30000ms exceeded. Call log: - waiting for locator('a[href$="/es/projects/2"]').first()
#3 FAIL · regenerate
L'element existeix però no és visible — pot estar dins d'un desplegable tancat o ocult per CSS.
locator.click: Timeout 30000ms exceeded. Call log: - waiting for getByText('Test').first() - locator resolved to <... [veure tot] locator.click: Timeout 30000ms exceeded. Call log: - waiting for getByText('Test').first() - locator resolved to <p class="mt-1 truncate text-xs text-zinc-600">admin@sprilur.test</p> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not visible - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not visible - retrying click action - waiting 100ms 58 × waiting for element to be visible, enabled and stable - element is not visible - retrying click action - waiting 500ms
4

Click export CSV and wait for download

Clicks the CSV export link and waits for the download to start, then captures the page state and verifies the export functionality works correctly

stable (4x)
step3769-csv-download-initiated

step3769 csv download initiated

11. click Click Exportar datos link to initiate CSV file download a[href$='/csv']
12. wait Wait for CSV download event to fire (page.waitForEvent('download'))
'Exportar datos' CSV export link is visible on the project results page

Codi Playwright tots els passos · // @lock / // @unlock per protegir línies

Desat ✓ Edita directament · usa // @lock i // @unlock en línies separades per bloquejar una secció

Resum d'execució

Test estable · tots els passos correctes

Generant resum de l'execució…

Detalls

Estat
active
Generació
stable
Validació
stable
Tipus
Playwright
Creat
03/06/2026 14:43

Tags

Tots els tags afegits

Cap tag assignat

Instruccions IA

Projecte

- **Locale coverage:** every public page and every key flow must be exercised in **both `/es` and `/eu`**; additionally verify the `/locale/{eu}` switch redirects back and persists in session. - **Default test account:** `admin@sprilur.test` / `password` (is_admin, verified, no 2FA) — use for `/admin` and authenticated frontend flows. For permission tests, use a **non-admin verified** user. - **Data conventions:** suffix any created test data (project `title`, document name, etc.) with a unique `uid` (timestamp/run id) to avoid collisions across runs. - **Mandatory assertions:** every form submission must assert the success outcome (redirect/toast) **and** the absence of validation errors; every navigation must assert the resulting **URL including its locale prefix**. - **Scope/priority:** auth + private project flows (login, create, evaluate, export) are **regression-critical** and get happy-path + key edge cases; public/buscador flows get happy path plus the "no guide type / no results / URL hydration" edges; backoffice gets representative CRUD smoke tests. - **Known seeded data to rely on:** - Guide types: **Urbanización** (`urbanization`), **Edificación** (`building`). - Typologies (urbanization): Residencial, Industrial, Terciario, Logístico, Equipamiento público, Mixto. (building): Edificio industrial, Edificio terciario. - Scopes (ámbito): **Proyecto**, **Obra**. - Chapters: GEN General, TRA Trabajos previos, PRE, VIA, AGU Agua, EST, ENE Energía, ZON, RES Residuos, EJE, MAN; (building) EDI Diseño del edificio, ENV. - Agents: Promotor, Proyectista, Constructor, Dirección facultativa, Administración pública, Empresa de mantenimiento. - Stages (Etapa): Planeamiento, Proyecto, Ejecución, Uso y mantenimiento, Fin de vida. - **Exports:** for PDF/CSV, assert the response/download headers (and CSV `;`/`,` formatting), not the binary contents.

Features Desat!

KPIs

Taxa d'èxit
100%
1r intent OK
0%
Iteracions totals
16
Temps total
129s
→ Validaci&oacute;
129s
Cost total
$1.2103
Tokens totals
1,589,224
Crides API
10
→ Cost/pas
$0.00c

Cost IA

Total
$1.2103
Generació
$0.1744
Execucions
$0.00c
Tokens totals
1,589,224
Crides API
10