wp-media / wp-rocket-e2e

Playwright E2E testing repo
GNU General Public License v3.0
0 stars 0 forks source link

Smoke test on lcp feature #106

Open Mai-Saad opened 5 months ago

Mai-Saad commented 5 months ago

Is your feature request related to a problem? Please describe. Currently, we aren't doing the check for preload markup for all the templates at lcp which results in hidden 404 after markup is applied and sometimes fatal error

Describe the solution you'd like For all templates, we need: Before all => visit all lcp templates so lcp/atf is created Given cache is cleared When template x is visited And hard refresh the page // this step as sometimes markup changes when we have timestamp cache at the page due to a special char handle then no error in debug.log And no console error

Additional context Possible enhancements:

  1. we can add as well that no visual regression or it will take much time
  2. we can check the markup is as expected or if it's already at integration tests (for all templates) then we can skip here
  3. we can check that fetchpriority='high' is added to image tag (this exists in some templates so may be better be other test) ==> as per https://github.com/wp-media/wp-rocket-e2e/issues/98 it's just now for lcp_regular_img_template so we can add on that other templates containing img tag either in picture or not
  4. We can check what other useful scenarios to pick from here https://github.com/wp-media/wp-rocket-e2e/issues/53#issuecomment-2026792281

    @MathieuLamiot @jeawhanlee what do you think?