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 all 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 cypress/e2e/pages/homePage/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ const urls = [
service: 'serbian',
local: '/serbian/lat',
test: '/serbian/lat',
live: '/serbian/lat',
},
{
service: 'serbian',
local: '/serbian/cyr',
test: '/serbian/cyr',
live: '/serbian/cyr',
},
];

Expand Down
66 changes: 7 additions & 59 deletions cypress/support/config/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5485,21 +5485,8 @@ module.exports = () => ({
smoke: true,
},
frontPage: {
environments: {
live: {
paths: ['/serbian/cyr'],
enabled: true,
},
test: {
paths: ['/serbian/cyr'],
enabled: false,
},
local: {
paths: ['/serbian/cyr'],
enabled: false,
},
},
smoke: true,
environments: undefined,
smoke: false,
},
liveRadio: { environments: undefined, smoke: false },
onDemandAudio: { environments: undefined, smoke: false },
Expand Down Expand Up @@ -5655,20 +5642,7 @@ module.exports = () => ({
smoke: true,
},
frontPage: {
environments: {
live: {
paths: ['/serbian/lat'],
enabled: true,
},
test: {
paths: ['/serbian/lat'],
enabled: false,
},
local: {
paths: ['/serbian/lat'],
enabled: false,
},
},
environments: undefined,
smoke: true,
},
liveRadio: { environments: undefined, smoke: false },
Expand Down Expand Up @@ -8846,21 +8820,8 @@ module.exports = () => ({
smoke: true,
},
frontPage: {
environments: {
live: {
paths: ['/zhongwen/simp'],
enabled: false,
},
test: {
paths: ['/zhongwen/simp'],
enabled: false,
},
local: {
paths: ['/zhongwen/simp'],
enabled: false,
},
},
smoke: true,
environments: undefined,
smoke: false,
},
liveRadio: { environments: undefined, smoke: false },
onDemandAudio: {
Expand Down Expand Up @@ -9053,21 +9014,8 @@ module.exports = () => ({
smoke: true,
},
frontPage: {
environments: {
live: {
paths: ['/zhongwen/trad'],
enabled: false,
},
test: {
paths: ['/zhongwen/trad'],
enabled: false,
},
local: {
paths: ['/zhongwen/trad'],
enabled: false,
},
},
smoke: true,
environments: undefined,
smoke: false,
},
liveRadio: { environments: undefined, smoke: false },
onDemandAudio: {
Expand Down
6 changes: 1 addition & 5 deletions lighthouse/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
const AUDIT_URLS = {
FRONT_PAGE: {
live: ['https://www.bbc.com/serbian/cyr'],
test: [],
},
FIX: {
live: ['https://www.bbc.com/persian/science-52004647'],
test: [
Expand Down Expand Up @@ -57,7 +53,7 @@ const AUDIT_URLS = {
},

TIPO_HOME_PAGE: {
live: ['https://www.bbc.com/kyrgyz'],
live: ['https://www.bbc.com/kyrgyz', 'https://www.bbc.com/serbian/lat'],
test: [
'https://www.test.bbc.com/kyrgyz?renderer_env=live',
'https://www.test.bbc.com/serbian/lat?renderer_env=live',
Expand Down
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