feat: Support Puppeteer launch options

Aperta
#4,498 3 commenti 8 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
testing

Direzione di ricerca

Inizia individuando la configurazione dei test in stencil.config.ts e l’integrazione esistente per l’avvio del browser. Determina come il valore richiesto testing.launchOptions debba arrivare alla chiamata di avvio di Puppeteer, quindi aggiungi una copertura che dimostri che il timeout di avvio può essere configurato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
13.2k
Fork
865
Merge medio
2g 16h
PR unite (30g)
29

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stenciljs/core

Tutte le issue di stenciljs/core

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.