collectBackendCoverage fails in afterAll step when the window's origin and baseUrl are both blank
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- cypress, nextjs, typescript
- Área
- testing
Línea de trabajo
Inspecciona support.js alrededor de collectBackendCoverage, identificado cerca de la línea 151 en el stack trace, y reproduce una prueba fallida que llegue después de afterAll y antes de cy.visit con el origen de window y baseUrl en blanco. Está hecho cuando la cobertura del frontend se completa sin intentar un cy.request() inválido cuando no se está recopilando la cobertura del backend.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I am running a cypress project that does not set "baseUrl" in our config file for various reasons. I am trying to add the code-coverage plugin, but only for front end metrics with our instrumented NextJs app.
Everything works except when we encounter the following scenario. When running a test that fails before it has executed cy.visit, so it has a blank window origin, and of course baseUrl is not set, then during the "afterAll" step the code coverage plugin fails with the following message. about collectBackendCoverage. Again we are not attempting to collect backend coverage so this is some default behavior of the plugin that should not be default behavior.
`cy.request()` must be provided a fully qualified `url` - one that begins with `http`. By default `cy.request()` will use either the current window's origin or the `baseUrl` in `cypress.config.ts`. Neither of those values were present.
https://on.cypress.io/request
Because this error occurred during a `after all` hook we are skipping all of the remaining tests.
Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
CypressError: `cy.request()` must be provided a fully qualified `url` - one that begins with `http`. By default `cy.request()` will use either the current window's origin or the `baseUrl` in `cypress.config.ts`. Neither of those values were present.
https://on.cypress.io/request
at Context.request (http://localhost:3000/__cypress/runner/cypress_runner.js:132841:70)
at wrapped (http://localhost:3000/__cypress/runner/cypress_runner.js:138282:43)
From Your Spec Code:
at Context.collectBackendCoverage (webpack://myproject/./node_modules/@cypress/code-coverage/support.js:151:0)
- Lenguaje dominante
- TypeScript
- Estrellas
- 440
- Forks
- 114
- Merge medio
- 42 min
- PR fusionados (30 d)
- 19
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cypress-io/code-coverage
-
Dificultad 3/5 Medio día Aptitud para principiantes 40/100
cypress-io/code-coverage#1018 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cypress-io/code-coverage#993 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cypress-io/code-coverage#967 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cypress-io/code-coverage#959 ·
Los mantenedores suelen responder en 1 día
-
performance
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
cypress-io/code-coverage#933 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cypress-io/code-coverage
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
anomalyco/opencode#62052 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
strapi/design-system#2084 ·
Los mantenedores suelen responder en 3 días
-
Report: &TV InternationalAbiertocheck:passed streams:remove
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día