Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCP: As QA I want to automate the scenario that check LL isnot applied on LCP/ATF images #129

Open
Mai-Saad opened this issue Aug 6, 2024 · 4 comments · May be fixed by #144
Open

LCP: As QA I want to automate the scenario that check LL isnot applied on LCP/ATF images #129

Mai-Saad opened this issue Aug 6, 2024 · 4 comments · May be fixed by #144
Assignees

Comments

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Aug 6, 2024

Scenario: Should exclude LCP/ATF from Lazyload
Given: all lazyload options are enabled
And: Page template x is added to ATF table
When: clear cache
And: visit page template x
Then: lcp image markup is not written to LL format
And: ATF image markup is not written to LL format
Note: this test better run to all different templates

Scenario: Should exclude next-gen lcp/atf from LL
Given: Imagify is enabled and display next-gen is enabled
And: page with images having next-gen avif, webp, avif/webp, no next gen is visited
And: LL is enabled at WPR
When: clear cache
And revisit the page
Then: lcp/ATF aren't Lazyloaded in source
Note: for further enhancement we can see what other plugins can have next gen and add scenarios or adjust the existing one to loop on those plugins

@Khadreal
Copy link
Contributor

Scope a solution ✅

Given that most steps are already available, this will cover the steps that aren't avaialble

Then: lcp image markup is not written to LL format
And: ATF image markup is not written to LL format

To implement this, we should have another function in lcp-beacon-script.ts to check for lazyloaded class in lcp/atf images. We can modify lcp image should have fetchpriority step and make the lcp images available outside the function scope.

Then('lcp image should have fetchpriority', async function (this: ICustomWorld) {

Create a new step to install and activate imagify plugin here

Estimate the effort ✅
[S]

@jeawhanlee
Copy link
Contributor

LGTM...

@Mai-Saad
Copy link
Contributor Author

Update as per https://docs.google.com/spreadsheets/d/1YpkRpc_PkcszOezpkIooWC6hIWnkIWnXITvoHNjEjIo/edit?gid=0#gid=0 , we can split scenario2 into 2 scenarios
scenario A: Should exclude LCP/ATF from LL if display next-gen is enabled before lcp
Given: Imagify is enabled and display next-gen is enabled
And: page with images having next-gen images is visited
And: LL is enabled at WPR
When: clear cache
And revisit the page
Then: lcp/ATF aren't Lazyloaded in source

scenario B: Should exclude LCP/ATF from LL if display next-gen is enabled after lcp
Given: Imagify is enabled and display next-gen is disabled
And: page with images having next-gen images is visited
And: LL is enabled at WPR
When: clear cache
And: Enable display next gen picture at imagify
And revisit the page
Then: lcp/ATF aren't Lazyloaded in source

test page can be: https://e2e.rocketlabsqa.ovh/lcp_with_imagify/

@Miraeld
Copy link
Contributor

Miraeld commented Oct 4, 2024

Moving it in Blocked until next cooldown as it's been a while we've be circling around with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants