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

Fix for E2Es failing on webp test #11700

Merged
merged 8 commits into from
Jun 6, 2024
Merged

Conversation

LilyL0u
Copy link
Contributor

@LilyL0u LilyL0u commented Jun 4, 2024

  1. The sport page has no image on. The tests now check for the presence of at least one img in the document before they run.

  2. There were .gif images in the frosted promos for one test asset. '.gif' was not included in the isWebSupported array of accepted url regexes. I added it in the regex.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

src/app/lib/utilities/ichefURL/index.js Show resolved Hide resolved
cypress/e2e/pages/testsForAllAMPPages.js Outdated Show resolved Hide resolved
src/app/lib/utilities/ichefURL/index.js Outdated Show resolved Hide resolved
src/app/lib/utilities/ichefURL/index.js Outdated Show resolved Hide resolved
@pvaliani pvaliani self-requested a review June 5, 2024 09:27
Copy link
Contributor

@pvaliani pvaliani 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!

pvaliani and others added 6 commits June 5, 2024 10:29
Co-authored-by: Karina Thomas <58214768+karinathomasbbc@users.noreply.github.com>
Co-authored-by: Karina Thomas <58214768+karinathomasbbc@users.noreply.github.com>
Copy link
Contributor

@eagerterrier eagerterrier left a comment

Choose a reason for hiding this comment

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

Might want to remove a commented line with a path in it. Otherwise #shipit™

@@ -15,7 +15,7 @@ describe('getIchefURL', () => {

describe('builds WebP ichef img url based on originCode, locator and resolution passed', () => {
const BASE_IMAGE_URL = 'https://ichef.bbci.co.uk';

// https://ichef.bbci.co.uk/ace/ws/400/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif.webp
Copy link
Contributor

Choose a reason for hiding this comment

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

Get rid?

// you leave the Cypress command queue and are using plain JS. Using .wrap converts
// the JQuery element into a Cypress wrapped element so we can execute Cypress commands on it

// Images are lazy loaded so we need to scroll to them, check they have loaded before getting currentSrc
Copy link
Contributor

Choose a reason for hiding this comment

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

Lovely use of commenting in this file. Love it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank

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.

🙌

@LilyL0u LilyL0u merged commit 43eb696 into latest Jun 6, 2024
11 checks passed
@LilyL0u LilyL0u deleted the fix-for-e2es-failing-on-webp-test branch June 6, 2024 09:13
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.

None yet

5 participants