From fa348b0d81c0cb121b54f04a8903f12d45cd1b3d Mon Sep 17 00:00:00 2001 From: Isabella Mitchell Date: Wed, 5 Feb 2025 13:14:31 +0000 Subject: [PATCH 1/5] WSTEAM1-1588: Adds superresponsive --- src/app/components/MediaLoader/types.ts | 1 + src/app/components/MediaLoader/utils/buildSettings.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/components/MediaLoader/types.ts b/src/app/components/MediaLoader/types.ts index a83d13fda25..0955ef1af94 100644 --- a/src/app/components/MediaLoader/types.ts +++ b/src/app/components/MediaLoader/types.ts @@ -20,6 +20,7 @@ export type PlayerConfig = { insideIframe?: boolean; embeddedOffsite?: boolean; externalEmbedUrl?: string; + superResponsive?: boolean; statsObject: { clipPID?: string | null; episodePID?: string | null; diff --git a/src/app/components/MediaLoader/utils/buildSettings.ts b/src/app/components/MediaLoader/utils/buildSettings.ts index 75ea173efeb..faf9b8b1ecd 100644 --- a/src/app/components/MediaLoader/utils/buildSettings.ts +++ b/src/app/components/MediaLoader/utils/buildSettings.ts @@ -47,6 +47,7 @@ const buildSettings = ({ enableToucan: true, appType: isAmp ? 'amp' : 'responsive', appName: service !== 'news' ? `news-${service}` : 'news', + superResponsive: true, ui: { skin: 'classic', controls: { enabled: true }, From cf0d95d4e0391fd2a6e63797fe7e0c5a4392e792 Mon Sep 17 00:00:00 2001 From: Isabella Mitchell Date: Wed, 5 Feb 2025 14:23:43 +0000 Subject: [PATCH 2/5] WSTEAM1-1588: Update unit tests: --- .../MediaLoader/utils/buildSettings.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/components/MediaLoader/utils/buildSettings.test.ts b/src/app/components/MediaLoader/utils/buildSettings.test.ts index 3a0e039fc48..07a82545221 100644 --- a/src/app/components/MediaLoader/utils/buildSettings.test.ts +++ b/src/app/components/MediaLoader/utils/buildSettings.test.ts @@ -74,6 +74,7 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', + superResponsive: true, playlistObject: { title: "BBC launch trailer for We Know Our Place women's sport campaign", @@ -158,6 +159,7 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', + superResponsive: true, playlistObject: { title: 'Five things ants can teach us about management', summary: 'This is a caption!', @@ -224,6 +226,7 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', + superResponsive: true, playlistObject: { title: 'Five things ants can teach us about management', summary: 'This is a caption!', @@ -292,6 +295,7 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', + superResponsive: true, externalEmbedUrl: 'https://www.bbc.com/serbian/lat/av-embeds/srbija-68707945/vpid/bbc_arabic_tv', playlistObject: { @@ -349,6 +353,7 @@ describe('buildSettings', () => { appName: 'news-arabic', appType: 'responsive', counterName: 'arabic.multimedia.2013.12.131208_iraq_blast_.page', + superResponsive: true, playlistObject: { title: 'Legacy Media Page Title', holdingImageURL: @@ -421,6 +426,7 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', + superResponsive: true, playlistObject: { title: 'Five things ants can teach us about management', summary: 'This is a caption!', @@ -700,6 +706,7 @@ describe('buildSettings', () => { autoplay: false, appName: 'news-hindi', counterName: 'hindi.bbc_hindi_tv.tv.w172zm8920nck2z.page', + superResponsive: true, statsObject: { destination: 'WS_NEWS_LANGUAGES', producer: 'HINDI', @@ -874,6 +881,7 @@ describe('buildSettings', () => { appType: 'responsive', autoplay: false, counterName: 'hausa.bbc_hausa_radio.liveradio.page', + superResponsive: true, playlistObject: { items: [ { @@ -956,6 +964,7 @@ describe('buildSettings', () => { autoplay: false, appName: 'news-afrique', counterName: 'afrique.bbc_afrique_radio.w172zn0kxd65h3g.page', + superResponsive: true, statsObject: { destination: 'WS_NEWS_LANGUAGES', producer: 'AFRIQUE', @@ -1081,6 +1090,7 @@ describe('buildSettings', () => { autoplay: false, counterName: 'live_coverage.c7dkx155e626t.page', enableToucan: true, + superResponsive: true, playlistObject: { holdingImageURL: 'https://ichef.bbci.co.uk/images/ic/$recipe/p0k31t4d.jpg', @@ -1180,6 +1190,7 @@ describe('buildSettings', () => { autoplay: false, counterName: 'live_coverage.cvp5r6m6mgpt.page', enableToucan: true, + superResponsive: true, playlistObject: { holdingImageURL: 'https://ichef.bbci.co.uk/images/ic/$recipe/p08b23t4.png', From 12f932d0414cf5d16e6d1f70e32c83e1aecc516b Mon Sep 17 00:00:00 2001 From: Isabella Mitchell Date: Fri, 7 Feb 2025 08:07:58 +0000 Subject: [PATCH 3/5] WSTEAM1-1588: Limits superResponsive to non-embedded meida --- src/app/components/MediaLoader/utils/buildSettings.test.ts | 1 - src/app/components/MediaLoader/utils/buildSettings.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/components/MediaLoader/utils/buildSettings.test.ts b/src/app/components/MediaLoader/utils/buildSettings.test.ts index 07a82545221..2fc1949e09c 100644 --- a/src/app/components/MediaLoader/utils/buildSettings.test.ts +++ b/src/app/components/MediaLoader/utils/buildSettings.test.ts @@ -426,7 +426,6 @@ describe('buildSettings', () => { appName: 'news-serbian', appType: 'responsive', counterName: 'live_coverage.testID.page', - superResponsive: true, playlistObject: { title: 'Five things ants can teach us about management', summary: 'This is a caption!', diff --git a/src/app/components/MediaLoader/utils/buildSettings.ts b/src/app/components/MediaLoader/utils/buildSettings.ts index faf9b8b1ecd..f212670ee8f 100644 --- a/src/app/components/MediaLoader/utils/buildSettings.ts +++ b/src/app/components/MediaLoader/utils/buildSettings.ts @@ -47,7 +47,6 @@ const buildSettings = ({ enableToucan: true, appType: isAmp ? 'amp' : 'responsive', appName: service !== 'news' ? `news-${service}` : 'news', - superResponsive: true, ui: { skin: 'classic', controls: { enabled: true }, @@ -55,6 +54,7 @@ const buildSettings = ({ subtitles: { enabled: true, defaultOn: true }, fullscreen: { enabled: true }, }, + ...(!embedded && { superResponsive: true }), ...(counterName && { counterName }), ...(isTestRequested() && { mediator: { host: 'open.test.bbc.co.uk' } }), statsObject: { From 28c3efa9b00583cdc8a710e6d43dd48a40c13094 Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 7 Feb 2025 08:14:12 +0000 Subject: [PATCH 4/5] Ensure smoke tests run on local environment --- cypress/e2e/pages/articles/index.cy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/pages/articles/index.cy.js b/cypress/e2e/pages/articles/index.cy.js index 3044908ce6e..4d88fc6c005 100644 --- a/cypress/e2e/pages/articles/index.cy.js +++ b/cypress/e2e/pages/articles/index.cy.js @@ -195,7 +195,7 @@ const nonSmokeCanonicalTestSuites = [ }, ]; -const canonicalTestSuites = Cypress.env.SMOKE +const canonicalTestSuites = Cypress.env('SMOKE') ? smokeCanonicalTestSuites : nonSmokeCanonicalTestSuites; @@ -235,6 +235,8 @@ const liteTestSuites = canonicalTestSuites }; }); +console.log({ canonicalTestSuites, ampTestSuites }); + runTestsForPage({ pageType: 'articles', testSuites: [...canonicalTestSuites, ...ampTestSuites, ...liteTestSuites], From 63b57b95d8439659f62823a508d1cfb0643a7a18 Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 7 Feb 2025 08:17:29 +0000 Subject: [PATCH 5/5] Remove console log --- cypress/e2e/pages/articles/index.cy.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/cypress/e2e/pages/articles/index.cy.js b/cypress/e2e/pages/articles/index.cy.js index 4d88fc6c005..173ab7615b2 100644 --- a/cypress/e2e/pages/articles/index.cy.js +++ b/cypress/e2e/pages/articles/index.cy.js @@ -235,8 +235,6 @@ const liteTestSuites = canonicalTestSuites }; }); -console.log({ canonicalTestSuites, ampTestSuites }); - runTestsForPage({ pageType: 'articles', testSuites: [...canonicalTestSuites, ...ampTestSuites, ...liteTestSuites],