Closed emilysaffron closed 2 weeks ago
I think the logic will need to be a bit more specific, like:
if (scriptLink && renderScriptSwitch) {
if (service === 'uzbek' && pageType !== ARTICLE_PAGE) return false;
return true;
}
return false;
Would be good to have extra tests in place for all these conditions to ensure it doesn't render when its not suppose to.
Just checking are translations being added in this or as a follow up PR?
Just checking are translations being added in this or as a follow up PR?
Yeah , have asked editorial for translations here and figured they could add them themselves as they're fairly confident editing the config files 😊
Are there plans in a future PR to add a cypress test for script switch behaviour on article pages?
Are there plans in a future PR to add a cypress test for script switch behaviour on article pages?
Im not sure, i dont think so? could add one as part of this or write a follow up ticket?
Resolves JIRA WSTEAM1-1034
Overall changes
Adds logic to only render the
scriptLink
button if the article is published through optimo and translations exist for it.Code changes
Testing
Helpful Links
Add Links to useful resources related to this PR if applicable.
Coding Standards
Repository use guidelines