feat: Support Puppeteer launch options

Abierto
#4,498 3 comentarios 8 reacciones 0 asignados Ver en GitHub

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
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
testing

Línea de trabajo

Comienza localizando la configuración de pruebas en stencil.config.ts y la integración existente para iniciar el navegador. Determina cómo debe llegar el valor solicitado testing.launchOptions a la llamada de inicio de Puppeteer y, a continuación, añade cobertura que demuestre que el tiempo de espera de inicio puede configurarse.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Feature: Want this? Upvote it!
Prerequisites
Describe the Feature Request

We seem to get this error intermittently in our CI - usually when it is under serious load:

[ ERROR ] Timed out after 30000 ms while trying to connect to the browser!

We are trying to address this in the CI but we noticed that the Puppeteer launch options are not configurable through the stencil.config.ts file:

https://pptr.dev/api/puppeteer.launchoptions

Ideally, we'd be able to simply increase the launch timeout for the browser to wait a little longer, but there seems to be no way to pass this through to puppeteer. We've looked through Puppeteers documentation and couldn't fine any solution there either.

Note: This is specifically the launch timeout option - not to be confused with the setDefaultOptions({ timeout: 0 }); - which we originally though would help.

Describe the Use Case

Being able to adjust the launchoptions for puppeteer (especially the timeout) gives us greater control over puppeteer. Without this being exposed there's no way to change the defaults.

Describe Preferred Solution

It would be nice if we could configure Puppeteer through the stencil.config. Something like:

export const config: Config = {
  ...
  testing: {
    launchOptions: { ... },
    ...
  }
};
Describe Alternatives

No response

Related Code

No response

Additional Information

No response

Lenguaje dominante
TypeScript
Estrellas
13.2k
Forks
865
Merge medio
2 d 16 h
PR fusionados (30 d)
29

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de stenciljs/core

Todos los issues de stenciljs/core

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.