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

WSTEAMA-1474 - Move Serbian and Zhongwen to list of migrated services #12212

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/routes/utils/regex/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ describe('frontPage -> homePage migration', () => {
'portuguese',
'punjabi',
'russian',
'serbian',
'sinhala',
'somali',
'swahili',
Expand All @@ -543,6 +544,7 @@ describe('frontPage -> homePage migration', () => {
'urdu',
'vietnamese',
'yoruba',
'zhongwen',
];
const migratedWorldServiceRoutes = migratedServices.map(serviceToRoute);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ exports[`regex utils snapshots should create expected regex from getErrorPageReg

exports[`regex utils snapshots should create expected regex from getFrontPageRegex when isLive = false 1`] = `"/:service():variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;

exports[`regex utils snapshots should create expected regex from getFrontPageRegex when isLive = true 1`] = `"/:service(archive|cymrufyw|naidheachdan|news|newsround|scotland|serbian|sport|ukchina|uzbek|ws|zhongwen):variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;
exports[`regex utils snapshots should create expected regex from getFrontPageRegex when isLive = true 1`] = `"/:service(archive|cymrufyw|naidheachdan|news|newsround|scotland|sport|ukchina|uzbek|ws):variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;

exports[`regex utils snapshots should create expected regex from getHomePageRegex when isLive = false 1`] = `"/:service(afaanoromoo|afrique|amharic|arabic|archive|azeri|bengali|burmese|cymrufyw|gahuza|gujarati|hausa|hindi|igbo|indonesia|japanese|korean|kyrgyz|marathi|mundo|naidheachdan|nepali|news|newsround|pashto|persian|pidgin|portuguese|punjabi|russian|scotland|serbian|sinhala|somali|sport|swahili|tamil|telugu|thai|tigrinya|turkce|ukchina|ukrainian|urdu|uzbek|vietnamese|ws|yoruba|zhongwen):variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;

exports[`regex utils snapshots should create expected regex from getHomePageRegex when isLive = true 1`] = `"/:service(afaanoromoo|afrique|amharic|arabic|azeri|bengali|burmese|gahuza|gujarati|hausa|hindi|igbo|indonesia|japanese|korean|kyrgyz|marathi|mundo|nepali|pashto|persian|pidgin|portuguese|punjabi|russian|sinhala|somali|swahili|tamil|telugu|thai|tigrinya|turkce|ukrainian|urdu|vietnamese|yoruba):variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;
exports[`regex utils snapshots should create expected regex from getHomePageRegex when isLive = true 1`] = `"/:service(afaanoromoo|afrique|amharic|arabic|azeri|bengali|burmese|gahuza|gujarati|hausa|hindi|igbo|indonesia|japanese|korean|kyrgyz|marathi|mundo|nepali|pashto|persian|pidgin|portuguese|punjabi|russian|serbian|sinhala|somali|swahili|tamil|telugu|thai|tigrinya|turkce|ukrainian|urdu|vietnamese|yoruba|zhongwen):variant(/simp|/trad|/cyr|/lat)?:amp(.amp)?:lite(.lite)?"`;

exports[`regex utils snapshots should create expected regex from getLegacyAssetRegex when isLive = false 1`] = `"/:service(afaanoromoo|afrique|amharic|arabic|archive|azeri|bengali|burmese|cymrufyw|gahuza|gujarati|hausa|hindi|igbo|indonesia|japanese|korean|kyrgyz|marathi|mundo|naidheachdan|nepali|news|newsround|pashto|persian|pidgin|portuguese|punjabi|russian|scotland|serbian|sinhala|somali|sport|swahili|tamil|telugu|thai|tigrinya|turkce|ukchina|ukrainian|urdu|uzbek|vietnamese|ws|yoruba|zhongwen):variant(/simp|/trad|/cyr|/lat)?/:assetUri([a-z0-9-_]{1,}/[a-z0-9-_/]{1,}):amp(.amp)?:lite(.lite)?"`;

Expand Down
2 changes: 2 additions & 0 deletions src/app/routes/utils/regex/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const homePageServices = [
'portuguese',
'punjabi',
'russian',
'serbian',
'sinhala',
'somali',
'swahili',
Expand All @@ -72,6 +73,7 @@ const homePageServices = [
'urdu',
'vietnamese',
'yoruba',
'zhongwen',
];

export const getFrontPageRegex = services => {
Expand Down
Loading