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

WORLDSERVICE-284 Automated testing to determine the weight of lite pages #12561

Merged

Conversation

emilysaffron
Copy link
Contributor

@emilysaffron emilysaffron commented Mar 24, 2025

Resolves JIRA: WORLDSERVICE-284

Summary

Adds a script to check page weight of lite pages on live and local, running as part of the local server github action.

Code changes

  • A bullet point list of key code changes that have been made.

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@emilysaffron emilysaffron self-assigned this Mar 25, 2025
@emilysaffron emilysaffron changed the title create lite page size checker script WORLDSERVICE-284 Automated testing to determine the weight of lite pages Mar 25, 2025
@karinathomasbbc
Copy link
Contributor

The nextJS pages seem to be bigger on live than they are on local. I am thinking that those pages are not actually compressed...

Screenshot 2025-03-25 at 17 20 40

@karinathomasbbc
Copy link
Contributor

I've noticed quite a big discrepancy between On Demand TV Brand pages - looks like https://www.bbc.com/gujarati/bbc_gujarati_tv/tv_programmes/w13xttqr.lite?renderer_env=live 404s. I think we should add some error checking, and ensure the response we get back from the curl is a 200.

@amoore108
Copy link
Contributor

amoore108 commented Mar 26, 2025

One to note is ws/languages isn't setup for .lite routing just yet. So the page its visiting and getting the content-length back for is likely a generic 404 page.

We may want to do something to highlight 404s and either not try and calculate the size and/or display a warning that the route 404'd?

…f github.com:bbc/simorgh into SPIKE-WORLDSERVICE-284-automate-litepage-weight-test

console.table(testResults.sort((a, b) => b.localSizeKb - a.localSizeKb));

const failures = testResults.filter(({ result }) => result === '❌');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy since this works and it is a developer script. Though I'm not sure I've seen a strict equality check against an emoji before! ===😄

Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - just a test to fix

@emilysaffron emilysaffron merged commit 99057d5 into latest Mar 27, 2025
11 checks passed
@emilysaffron emilysaffron deleted the SPIKE-WORLDSERVICE-284-automate-litepage-weight-test branch March 27, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants