Skip to content

Conversation

@Scot3004
Copy link
Contributor

@Scot3004 Scot3004 commented Feb 8, 2026

Pull request

  • Agregados nuevos tests unitarios sobre utils
  • Documentada test strategy
  • Adicionados Test unitarios y Lint al pipeline
  • Renombrado pipeline de tests ya no se llama playwright
  • Unit se corre siempre excepto en workflow_dispatch
  • Eliminada dependencia dotenv (muy ruidosa) en favor de env-cmd
  • Playwright ya no se encarga de cargar las variables de entorno
  • Eslint tiene una configuración mas estricta
  • Actualizado codigo que se podia arreglar con eslint --fix
  • Warn para no explicit any, el codigo no esta preparado con buen coverage para hacer un refactor de estos

* Documentación de la estrategia de testing, incluyendo tipos de tests, herramientas y mejores prácticas.
* Reorganización de pruebas unitarias
* Renombrado del workflow de Playwright a "tests.yml" para reflejar mejor su propósito.
* Test A11yActions como verdadero ejemplo
* Ejemplos de codigo usando alias import
El script lee el archivo.env y luego ejecuta playwright test
Ahora se instalan las siguientes extensiones
* vitest
* playwright
* eslint
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for secorto-astro ready!

Name Link
🔨 Latest commit 49a0034
🔍 Latest deploy log https://app.netlify.com/projects/secorto-astro/deploys/6988218c2b01d300080bd1bc
😎 Deploy Preview https://deploy-preview-76--secorto-astro.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100
Accessibility: 100
Best Practices: 100
SEO: 100
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@cypress
Copy link

cypress bot commented Feb 8, 2026

SeCOrTo web    Run #200

Run Properties:  status check passed Passed #200  •  git commit 5cadfe2699: Organizados readme y copilot instruction
Project SeCOrTo web
Branch Review pull/76/head
Run status status check passed Passed #200
Run duration 01m 37s
Commit git commit 5cadfe2699: Organizados readme y copilot instruction
Committer Sergio Orozco
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 6
View all changes introduced in this branch ↗︎

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Actualiza la estrategia de testing del repo (unit con Vitest y E2E con Playwright), agrega cobertura y lint al pipeline de CI, y refuerza tooling/configuración para tests y linting en un proyecto Astro + TypeScript.

Changes:

  • Añade/ajusta configuración de Vitest (setup global + aliases) y nuevos unit tests para utils e i18n.
  • Actualiza el workflow de GitHub Actions para correr lint + unit con coverage y E2E en paralelo; renombra el workflow a “Tests”.
  • Elimina dotenv del setup de Playwright y documenta cómo ejecutar E2E con variables de entorno; endurece ESLint.

Reviewed changes

Copilot reviewed 32 out of 40 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
vitest.config.ts Añade aliases y setup file para unit tests
tsconfig.json Añade path alias @github/*
tests/unit/wait-netlify.fetch.test.ts Elimina test antiguo (migrado a otra ruta)
tests/unit/utils/sectionLoader.test.ts Nuevo unit test para sectionLoader
tests/unit/utils/rssBuilder.test.ts Nuevo unit test para rssBuilder
tests/unit/utils/paths.test.ts Nuevo unit test para paths utils
tests/unit/infraestructure/wait-netlify.test.ts Ajusta imports a alias + tipado en test
tests/unit/infraestructure/wait-netlify.runner.test.ts Corrige rutas relativas a runner/scripts
tests/unit/infraestructure/wait-netlify.run.test.ts Ajusta imports a alias + captura exit code
tests/unit/infraestructure/wait-netlify.resolve.test.ts Ajuste de import + cleanup más seguro de temp file
tests/unit/infraestructure/wait-netlify.print.test.ts Ajusta imports a alias
tests/unit/infraestructure/wait-netlify.poll.test.ts Ajusta imports a alias
tests/unit/infraestructure/wait-netlify.main.test.ts Ajusta mocks/imports a alias
tests/unit/infraestructure/wait-netlify.fetch.test.ts Nuevo test para guard de fetch
tests/unit/infraestructure/wait-netlify.ensure.test.ts Ajusta imports a alias (con un caso restante relativo)
tests/unit/infraestructure/wait-netlify.branch.test.ts Ajusta imports a alias
tests/unit/infraestructure/wait-netlify-validate.test.ts Ajusta imports a alias
tests/unit/infraestructure/wait-netlify-api.test.ts Simplifica setup/teardown y usa alias
tests/unit/i18n/utils.test.ts Nuevos unit tests para utils i18n
tests/unit/i18n/rootMap.test.ts Nuevos unit tests para rootMap i18n
tests/unit/i18n/buildTranslationMap.test.ts Nuevo unit test para buildTranslationMap
tests/setup.ts Setup global de Vitest (silenciar console + restore mocks + mock astro:content)
tests/actions/A11yActions.ts Envuelve análisis axe en test.step
src/env.d.ts Ajuste de inclusión de tipos Astro
src/content.config.ts Reemplaza any por ImageFunction en schema helper
src/components/PostDate.astro Ajustes de indentación/format
src/components/ListWork.astro Ajustes de indentación/format
src/components/BlogTalkPostView.astro Ajustes de indentación/format
playwright.config.ts Elimina carga automática de .env con dotenv
package.json Scripts nuevos E2E + elimina dotenv + agrega typescript-eslint plugin
package-lock.json Sync lockfile (remove dotenv, engines, eslint plugin)
eslint.config.js ESLint más estricto + typescript-eslint plugin + ignores
docs/TESTING_STRATEGY.md Nuevo documento de estrategia de testing
cypress/e2e/stubs.ts Ajustes de indentación + suppress de no-explicit-any localizado
cypress/e2e/main-page.cy.ts Fix de bracket/indent
cypress/e2e/blog.cy.ts Fix de bracket/indent
README.md Documenta comandos de testing y uso de env vars en E2E
.github/workflows/tests.yml Nuevo workflow “Tests” con unit+lint y E2E + artifacts
.github/copilot-instructions.md Añade guía: unit tests + @ts-check/JSDoc para JS utilitario
.devcontainer/devcontainer.json Actualiza Node image + extensiones recomendadas
Comments suppressed due to low confidence (2)

tests/unit/infraestructure/wait-netlify.ensure.test.ts:54

  • In this file, most tests import the module as @github/scripts/wait-netlify.js, but the last test imports it via a relative path (../../../.github/scripts/wait-netlify.js). Importing the same module under different specifiers can create multiple module instances and make vi.resetModules()/mocks behave inconsistently. Use the same specifier (@github/...) throughout this suite.
    .github/workflows/tests.yml:36
  • The YAML indentation under both jobs is invalid: steps: is followed by list items (- uses, - name, etc.) at the same indentation level, but sequence items must be indented under steps: (e.g., steps:\n - ...). As written, this workflow will fail to parse and won’t run in GitHub Actions.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 44 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

tests/unit/infraestructure/wait-netlify.ensure.test.ts:54

  • This import uses a relative path (../../../.github/...) while the rest of the file uses the new @github/... alias. For consistency (and to avoid future path mistakes if the test file moves), switch this import to use @github/scripts/wait-netlify.js like the others.

* npm run test:unit no genera cobertura
* Copilot instructions tenia mal la indentation en Testing guidance
* Eliminado bloque redundante when refactoring
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 44 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

tests/unit/infraestructure/wait-netlify.ensure.test.ts:54

  • This test imports wait-netlify.js via a deep relative path, while the rest of the suite uses the new @github/... alias. Keeping a single import style reduces path mistakes and ensures the Vitest/TS alias configuration is actually exercised. Consider switching this import to @github/scripts/wait-netlify.js for consistency.


| Command | Acción |
| :------------------ | :--------------------------------------------------------------- |
| `npm run test` | Ejecuta las pruebas E2E (Playwright/Cypress según configuración) |
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Tests section says npm run test runs E2E tests with “Playwright/Cypress”, but package.json currently defines test as cypress run. Either update the documentation to match the current command behavior, or change the test script to reflect the intended default E2E runner.

Suggested change
| `npm run test` | Ejecuta las pruebas E2E (Playwright/Cypress según configuración) |
| `npm run test` | Ejecuta las pruebas E2E con Cypress (`cypress run`) |

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Scot3004 Scot3004 merged commit c8d6ef3 into master Feb 8, 2026
6 of 7 checks passed
@Scot3004 Scot3004 deleted the testing-strategy branch February 8, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant