Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
dca3e9e
Move cypress tests to ws-nextjs-app
hotinglok Apr 17, 2026
af894ff
WS-200: Initial commit
Isabella-Mitchell Apr 17, 2026
d0ff5ab
WS-200: Tidies. Adds toggle support and unit tests.
Isabella-Mitchell Apr 17, 2026
6cd9942
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
Isabella-Mitchell Apr 17, 2026
c98c92f
WS-200: Fix tests
Isabella-Mitchell Apr 17, 2026
6c0b601
WS-200: Tidies
Isabella-Mitchell Apr 17, 2026
8a9bc03
WS-200: Tidies. Adds unit test
Isabella-Mitchell Apr 17, 2026
92b9b1b
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
Isabella-Mitchell Apr 17, 2026
eb5c005
WS-200: Fix test
Isabella-Mitchell Apr 17, 2026
5d011f4
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
shayneahchoon Apr 20, 2026
a5b9fda
WS-200: Tidies
Isabella-Mitchell Apr 21, 2026
e2225b2
WS-200: Tidies
Isabella-Mitchell Apr 21, 2026
5dbd991
WS-2494: Migrates liveRadio Integration tests to NextJS app
Isabella-Mitchell Apr 21, 2026
698a103
WS-2494: TS test. Updates snapshots
Isabella-Mitchell Apr 21, 2026
23484b7
WS-2494: Define types
Isabella-Mitchell Apr 21, 2026
ca97e42
WS-2494: Adds passWithNoTests flag
Isabella-Mitchell Apr 21, 2026
0f60440
Merge branch 'WS-200-migrate-liveradio-simorgh' into ws-2495-migrate-…
hotinglok Apr 21, 2026
66b9af1
Fix failing test
hotinglok Apr 21, 2026
a4399d4
Re-add express tests
hotinglok Apr 21, 2026
dbd4e20
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
Isabella-Mitchell Apr 23, 2026
181e4c7
Merge branch 'WS-200-migrate-liveradio-simorgh' into WS-2494-LiveRadi…
Isabella-Mitchell Apr 23, 2026
dd527e4
Merge branch 'WS-200-migrate-liveradio-simorgh' into ws-2495-migrate-…
Isabella-Mitchell Apr 23, 2026
e5d073d
WS-2540: Skips tests
Isabella-Mitchell Apr 23, 2026
b290709
WS-2540: Skips missed test
Isabella-Mitchell Apr 23, 2026
e7b1800
WS-2540: Removes express pages e2e tests
Isabella-Mitchell Apr 23, 2026
0900698
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
Isabella-Mitchell Apr 23, 2026
c4e38de
Merge branch 'WS-200-migrate-liveradio-simorgh' into WS-2494-LiveRadi…
Isabella-Mitchell Apr 23, 2026
02488bd
Merge branch 'WS-200-migrate-liveradio-simorgh' into ws-2495-migrate-…
Isabella-Mitchell Apr 23, 2026
b5d24d7
Merge pull request #13931 from bbc/WS-2494-LiveRadio-Integration
Isabella-Mitchell Apr 23, 2026
dc6d4c0
Merge branch 'WS-200-migrate-liveradio-simorgh' into ws-2495-migrate-…
Isabella-Mitchell Apr 23, 2026
8ce38a9
Merge pull request #13926 from bbc/ws-2495-migrate-live-radio-e2es
Isabella-Mitchell Apr 23, 2026
2178537
Merge branch 'WS-200-migrate-liveradio-simorgh' into WS-2540-remove-e…
Isabella-Mitchell Apr 23, 2026
b20b75a
WS-2540: Updates package.json
Isabella-Mitchell Apr 23, 2026
95d2438
WS-200: Optimises test so that negative assertion does not rely on N…
Isabella-Mitchell Apr 23, 2026
1235125
Merge branch 'WS-200-migrate-liveradio-simorgh' into WS-2540-remove-e…
Isabella-Mitchell Apr 23, 2026
bd9a46f
Merge pull request #13948 from bbc/WS-2540-remove-express-pages-e2e-test
Isabella-Mitchell Apr 23, 2026
52adc51
Merge branch 'latest' into WS-200-migrate-liveradio-simorgh
Isabella-Mitchell Apr 28, 2026
914d2e3
WS-200: Removes isTest mock from tests
Isabella-Mitchell Apr 28, 2026
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
48 changes: 0 additions & 48 deletions .github/workflows/simorgh-e2e-pages.yml

This file was deleted.

31 changes: 0 additions & 31 deletions cypress/e2e/pages/testsForAllAMPPages.js

This file was deleted.

44 changes: 0 additions & 44 deletions cypress/e2e/pages/testsForAllCanonicalPages.js

This file was deleted.

73 changes: 0 additions & 73 deletions cypress/e2e/pages/testsForAllPages.js

This file was deleted.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@
"build:storybook": "yarn build && storybook build -c .storybook -o storybook_dist",
"build:test": "cp envConfig/test.env .env && NODE_ENV=production webpack",
"build:test:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/test.env > .env && NODE_ENV=production webpack",
"cypress:pages": "cypress run --browser chrome --spec ./cypress/e2e/pages",
"cypress:special-features": "cypress run --browser chrome --spec ./cypress/e2e/specialFeatures",
"cypress": "run-p --print-name --aggregate-output --continue-on-error cypress:pages cypress:special-features",
"cypress": "run-p --print-name --aggregate-output --continue-on-error cypress:special-features",
"cypress:install": "cypress install",
"cypress:onefile": "CYPRESS_APP_ENV=live CYPRESS_SMOKE=false cypress run --spec './cypress/e2e/pages/storyPage/*'",
"cypress:oneservice": "CYPRESS_APP_ENV=live CYPRESS_SMOKE=false CYPRESS_ONLY_SERVICE=mundo cypress run",
"cypress:oneserviceandonefile": "CYPRESS_APP_ENV=live CYPRESS_SMOKE=false CYPRESS_ONLY_SERVICE=mundo cypress run --spec './cypress/e2e/pages/storyPage/*'",
"cypress:interactive": "cypress open",
"setupDevEnv": "cp envConfig/local.env .env && rm -rf envConfig/secret.env && ./scripts/checkSecretEnvVariables.sh",
"dependencyFreshness": "node ./scripts/dependencyFreshness",
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/LiveRadioPage/LiveRadioPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import ATIAnalytics from '../../components/ATIAnalytics';
import ChartbeatAnalytics from '../../components/ChartbeatAnalytics';
import MetadataContainer from '../../components/Metadata';
import LinkedData from '../../components/LinkedData';
import { LiveRadioPageData } from './types';
import { LiveRadioPageProps } from './types';

const LiveRadioPage = ({ pageData }: { pageData: LiveRadioPageData }) => {
const LiveRadioPage = ({ pageData }: { pageData: LiveRadioPageProps }) => {
const {
language,
name,
Expand Down
16 changes: 8 additions & 8 deletions src/app/pages/LiveRadioPage/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { data as kyrgyzPageData } from '#data/kyrgyz/bbc_kyrgyz_radio/liveradio.
import { render } from '../../components/react-testing-library-with-providers';
import { ServiceContextProvider } from '../../contexts/ServiceContext';
import LiveRadioPage from './LiveRadioPage';
import { LiveRadioPageData } from './types';
import { LiveRadioPageProps } from './types';

type Props = {
pageData: LiveRadioPageData;
pageData: LiveRadioPageProps;
service: Services;
lang: string;
};
Expand Down Expand Up @@ -44,7 +44,7 @@ describe('Radio Page Main', () => {
it('should match snapshot for Canonical', () => {
const { container } = render(
<Page
pageData={afriquePageData.data as unknown as LiveRadioPageData}
pageData={afriquePageData.data as unknown as LiveRadioPageProps}
service="afrique"
lang="fr"
/>,
Expand All @@ -57,7 +57,7 @@ describe('Radio Page Main', () => {
it('should show the title for the Live Radio page', () => {
const { getByText } = render(
<Page
pageData={afriquePageData.data as unknown as LiveRadioPageData}
pageData={afriquePageData.data as unknown as LiveRadioPageProps}
service="afrique"
lang="fr"
/>,
Expand All @@ -70,7 +70,7 @@ describe('Radio Page Main', () => {
it('should show the summary for the Live Radio page', () => {
const { getByText } = render(
<Page
pageData={afriquePageData.data as unknown as LiveRadioPageData}
pageData={afriquePageData.data as unknown as LiveRadioPageProps}
service="afrique"
lang="fr"
/>,
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('Radio Page Main', () => {
{
...afriquePageData.data,
mediaBlock: mockMediaBlock,
} as unknown as LiveRadioPageData
} as unknown as LiveRadioPageProps
}
service="afrique"
lang="fr"
Expand All @@ -132,7 +132,7 @@ describe('Radio Page Main', () => {
it('should show the radio schedule for the Live Radio page on canonical', () => {
const { getByText } = render(
<Page
pageData={afriquePageData.data as unknown as LiveRadioPageData}
pageData={afriquePageData.data as unknown as LiveRadioPageProps}
service="afrique"
lang="fr"
/>,
Expand All @@ -150,7 +150,7 @@ describe('Radio Page Main', () => {
it('should not show the radio schedule for services without a schedule', async () => {
const { container } = render(
<Page
pageData={kyrgyzPageData as unknown as LiveRadioPageData}
pageData={kyrgyzPageData as unknown as LiveRadioPageProps}
service="kyrgyz"
lang="ky"
/>,
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/LiveRadioPage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ATIData } from '#app/components/ATIAnalytics/types';
import { ChartbeatProps } from '#app/components/ChartbeatAnalytics/types';
import { LiveRadioBlock } from '#app/models/types/media';

export type LiveRadioPageData = {
export type LiveRadioPageProps = {
language: string;
name: string;
summary: string;
Comment on lines +5 to 8
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exported type name LiveRadioPageProps describes the shape of pageData (language/name/summary/etc), not the React component props object. This is already causing confusion in the Next.js catch-all route types. Consider renaming this back to something like LiveRadioPageData (and, if needed, introducing a separate LiveRadioPageProps type that wraps { pageData: LiveRadioPageData }).

Copilot generated this review using guidance from repository custom instructions.
Expand Down
9 changes: 7 additions & 2 deletions src/app/routes/utils/constructPageFetchUrl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,14 @@ const constructPageFetchUrl = ({
);
break;
}
case LIVE_RADIO_PAGE:
fetchUrl = Url(`${pathname}`);
case LIVE_RADIO_PAGE: {
if (process.env?.NEXTJS) {
fetchUrl = Url(`${host}${port}/api/local${pathname}`);
} else {
fetchUrl = Url(`${pathname}`);
}
break;
}
case LIVE_TV_PAGE: {
fetchUrl = Url(`${host}${port}/api/local/${service}/watch/${id}/live`);
break;
Expand Down
1 change: 1 addition & 0 deletions src/integration/utils/runTests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const runExpressTests = () =>
'--colors',
'--detectOpenHandles',
'--forceExit',
'--passWithNoTests', // Allows the test suite to pass now all page types are migrated to NextJS
...getJestArgs(),
],
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import runTestsForPage from '#nextjs/cypress/support/helpers/runTestsForPage';
import runTestsForPage, {
TestDataType,
} from '../../support/helpers/runTestsForPage';
import e2eTests from './tests';
import testsForAllPages from '../testsForAllPages';
import testsForAllCanonicalPages from '../testsForAllCanonicalPages';
import { assertPageView } from '../../specialFeatures/atiAnalytics/assertions';
import { assertPageView } from '../specialFeatures/atiAnalytics/assertions';
import {
assertRadioScheduleComponentClick,
assertRadioScheduleComponentView,
} from '../../specialFeatures/atiAnalytics/assertions/radioSchedule';
} from '../specialFeatures/atiAnalytics/assertions/radioSchedule';

const pageType = 'liveRadio';

Expand Down Expand Up @@ -103,7 +105,7 @@ const testSuites = [
runforEnv: ['local', 'test', 'live'],
tests,
},
];
] as unknown as TestDataType[];

const atiAnalyticsTestSuites = [
{
Expand All @@ -120,7 +122,7 @@ const atiAnalyticsTestSuites = [
assertRadioScheduleComponentClick,
],
},
];
] as unknown as TestDataType[];

runTestsForPage({
pageType,
Expand Down
Loading
Loading