SEO toggle and tests added#14105
Conversation
| const { enabled: podcastSeoImprovementsEnabled } = useToggle( | ||
| 'podcastSeoImprovements', | ||
| ); | ||
|
|
There was a problem hiding this comment.
This toggle doesn't seem to exist in iSite anywhere. I can see that in the ticket it says to put this change behind the toggle, but i think that maybe that has been made up by the AI? I wouldn't have thought a change this small / non-breaking would need to be put behind a toggle.
test isite link for reference
live isite toggles result (you will need to set the header Origin to https://www.bbc.com/ for this link to work)
I may have missed it somewhere though so please shout if im wrong and we need this in place!
There was a problem hiding this comment.
I agree, I think we should remove the toggle. if we validate these changes are okay locally and on preview then that's enough
|
using this asset: and validating it, I see the I think we should remove the toggle, but other than that changes look good! |
| "onDemandRadioSchedule": { | ||
| "enabled": false, | ||
| }, | ||
| "podcastPromo": { |
There was a problem hiding this comment.
once this toggle is removed from the live config this snapshot will neeed updating too!
There was a problem hiding this comment.
yeah, can I just run npm test -- -u
There was a problem hiding this comment.
npm run test:unit -u
or
npm run test:unit:updatesnapshots
you can always check package.jsons for lists of commands that you can use, under the scripts object 😄
There was a problem hiding this comment.
or when its just one snapshot failing like this, you can go that test file and run just that test with -u appended, using npx jest pathname
| '@id': audioId, | ||
| name: episodeTitle || promoBrandTitle, | ||
| description: summary, | ||
| ...(contentUrl && { |
There was a problem hiding this comment.
nitpick: we could simplify this by doing
downloadLink.linkUrl && {
downloadLink.linkUrl
encodingFormat: 'audio/mpeg'
}
and not bothering with the contentUrl variable
Resolves JIRA: https://bbc.atlassian.net/browse/WS-2316
Summary
Add contentUrl to AudioObject structured data on podcast episode pages where a valid downloadable audio URL exists
Code changes
Testing
Useful Links