In Chrome a resize event is always fired just before the screenshot

Aperta
#1,604 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, playwright
Ambito
testing-qa

Direzione di ricerca

Inizia riproducendo il caso segnalato con BackstopJS v6.3.25 e Playwright v1.52.0 in Chrome su macOS, usando debugWindow e un gestore del ridimensionamento, quindi confronta la stessa esecuzione in Firefox. Il lavoro è completato quando lo screenshot non attiva più il cambiamento di stato indesiderato causato dal ridimensionamento, senza aggiungere controlli test-only all’applicazione.

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

Descrizione

...Which is a problem if there is a state on the screen that reacts to that event, e.g. a menu is open which is supposed to be on the screenshot, but it is not.

No amount of delays can help with that, because the resize event is triggered as the last thing before the image is taken.

I have looked at it with debugWindow: true numerous times, but there are no visible size change, still with window.addEventListener('resize', myHandler); myHandler always fires.

It is not critical, I've worked around it by disabling the menu closing behaviour for test runs, but it caused me substantial headache to figure out what was going on, also it is a smell to put extra checks into the main code to accommodate tests, so it'd be preferable to not have it there.

I am also running the same tests using Firefox, that does not have this issue.

Info:
backstopjs v6.3.25 + playwright v1.52.0 running natively in MacOS on Apple Silicon

Lingua principale
JavaScript
Stelle
7.2k
Fork
617
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 garris/BackstopJS

Tutte le issue di garris/BackstopJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.