Diagnóstico sistemático y corrección de 3 tests Playwright inestables en CI/CD (GitHub Actions)
Falla en CI ~40% · pasa siempre en local
TimeoutError: waiting for locator('.payment-confirmed') to be visible exceeded 5000ms
--repeat-each=20 → pasa 20/20 en local → descarta Timing local--workers=1 --grep → pasa en local con 1 worker → descarta Isolationpage.route('**/stripe.com/**', ...) para eliminar red externawaitForResponse"Falla en suite completa · pasa si se ejecuta solo
AssertionError: Expected 15 rows, received 0 — table body is empty
--grep "patient list" → pasa 10/10 → confirma isolationauth.spec.ts ejecutado antes hace DELETE /api/patientstestClinicId compartida + auth.spec.ts borra pacientes en afterAll sin restaurarisolatedClinic en fixtures.ts para reutilizar el patrónFalla intermitentemente en local y en CI (~25%)
Error: locator('button[data-action="download"]') — Element not found in DOM
--repeat-each=20 → falla 5/20 en local → confirma Timing/Asyncpage.click() sin await expect().toBeEnabled() → race condition con generación async de PDFwaitForTimeout, sincronizado con API response
waitForTimeout en el proyecto — añadir a ESLint: no-restricted-propertieswaitForResponse o waitForEvent antes de interactuar con elementos dinámicosPromise.all([waitForEvent, click]) al wiki de QA