Skip to content

Remove Express Cypress references + Actions cleanup - #14003

Merged
amoore108 merged 29 commits into
latestfrom
NOTICKET-remove-express-github-actions
May 14, 2026
Merged

Remove Express Cypress references + Actions cleanup#14003
amoore108 merged 29 commits into
latestfrom
NOTICKET-remove-express-github-actions

Conversation

@amoore108

@amoore108 amoore108 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

GitHub Actions:

  • Removes Build steps for the Express app in Github Actions as these are no longer required
  • Removes Integration run step for the Express app as it is no longer required
  • Removes steps for Express 'local server' tests as these are no longer required
  • Updates AMP validator and Puppeteer references to point to port 7081 instead of 7080

Cypress:

  • Moves remaining specialFeatures e2e tests out of Express app and into Next.js app
  • Fixes imports that were pointing to Express Cypress in the Next Cypress files
  • Add missing 'helper' functions into Next app
  • Creates workflows for application, pageTypes and specialFeatures
  • Updates references to old local data API to new Next.js one
  • Deletes the contents of the old cypress/e2e, cypress/support folders as these contents are all in the Next app. I've left the actual folders themselves to make it easier to move the Next version up to this level in the future.

Testing

  1. List the steps required to test this PR.

Useful Links

@amoore108 amoore108 self-assigned this May 11, 2026
@amoore108 amoore108 changed the title Remove Express app Github Actions Remove Express build/start Github Actions May 11, 2026
@amoore108
amoore108 requested a review from Copilot May 11, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates CI and end-to-end tooling to stop building/starting the legacy Express app in GitHub Actions, while consolidating “specialFeatures” E2E coverage into the Next.js Cypress suite and aligning local test tooling to use port 7081.

Changes:

  • Remove Express build/start (and related workflow) steps from GitHub Actions; keep Next.js build and shared unit tests.
  • Move/introduce “specialFeatures” Cypress tests/utilities into ws-nextjs-app and rely on the consolidated Next.js E2E workflow.
  • Update local AMP validator and Puppeteer base URL assumptions to port 7081.

Reviewed changes

Copilot reviewed 13 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ws-nextjs-app/cypress/support/helpers/visitPage.ts Adds a Next.js Cypress visitPage helper including status/type checks and consent-cookie setup.
ws-nextjs-app/cypress/e2e/specialFeatures/utilities/cookiePrivacyBanner/index.ts Introduces Cypress DOM helpers for privacy/cookie banner assertions using service translations.
ws-nextjs-app/cypress/e2e/specialFeatures/prerollAds/index.cy.ts Ports preroll-ads Cypress spec into Next.js E2E suite.
ws-nextjs-app/cypress/e2e/specialFeatures/prerollAds/config.ts Adds environment-specific URL configuration for preroll-ads checks.
ws-nextjs-app/cypress/e2e/specialFeatures/fontCaching/index.cy.ts Adds font-caching Cypress coverage across multiple services/variants.
ws-nextjs-app/cypress/e2e/specialFeatures/fontCaching/assertions/index.ts Adds assertions for validating cached fonts in localStorage.
ws-nextjs-app/cypress/e2e/specialFeatures/cookieBanner/testsForCanonicalOnly.ts Adds canonical cookie/privacy banner behavioural tests and cookie expiry checks.
ws-nextjs-app/cypress/e2e/specialFeatures/cookieBanner/index.cy.ts Wires cookie banner tests into runTestsForPage suites with smoke/non-smoke selection.
src/startServer.test.js Removes Jest coverage for Express clustering/server start behaviour.
scripts/ampHtmlValidator/checkManifest/index.js Switches local manifest check to localhost:7081.
puppeteer/runTestsForPage/index.ts Switches Puppeteer local base URL to localhost:7081.
puppeteer/bundleRequests/index.test.js Removes “modern bundle” assertions from Puppeteer bundle request tests.
puppeteer/bundleRequests/assertions/index.js Updates assertions module exports after removing modern-bundle checks.
.github/workflows/simorgh-unit-tests.yml Removes Express build step; continues building Next.js and running both unit test suites.
.github/workflows/simorgh-local-server-tests.yml Removes Express build/start; builds/starts Next.js on 7081 for AMP/Lighthouse/Puppeteer.
.github/workflows/simorgh-integration-tests.yml Removes Express integration test step; keeps Next.js integration tests.
.github/workflows/simorgh-e2e-special-features.yml Deletes the dedicated “special features” Cypress workflow.
.github/workflows/simorgh-e2e-nextjs.yml Simplifies Cypress install steps to only install dependencies/binary for the Next.js app.
Comments suppressed due to low confidence (1)

puppeteer/bundleRequests/assertions/index.js:6

  • This test filters JS bundle requests using localBaseUrl from #testHelpers/config (currently http://localhost:7080), but Puppeteer local runs are now configured to use http://localhost:7081. As a result, isJsBundle will filter out all local requests and the assertions won’t run (false positives). Update the filter to use the actual Puppeteer base URL/host for the current environment (or update the shared localBaseUrl constant in a way that doesn’t break Express tests).
import { localBaseUrl } from '#testHelpers/config';
import context from '../../context';

const isJsBundle = url => url.includes(localBaseUrl);

@amoore108 amoore108 changed the title Remove Express build/start Github Actions Remove Express Cypress GitHub actions and E2E tests May 11, 2026
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Dismissed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Fixed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Fixed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Fixed
Comment thread src/app/routes/utils/constructPageFetchUrl/index.test.ts Fixed
Comment thread src/app/routes/utils/fetchDataFromBFF/index.test.ts Dismissed
Comment thread src/app/routes/utils/fetchDataFromBFF/index.test.ts Dismissed
Comment thread src/app/routes/utils/fetchDataFromBFF/index.test.ts Dismissed
Comment thread src/app/routes/utils/fetchDataFromBFF/index.test.ts Dismissed
@amoore108 amoore108 changed the title Remove Express Cypress GitHub actions and E2E tests Remove Express Cypress GitHub actions and tidy E2E tests May 11, 2026
@amoore108 amoore108 changed the title Remove Express Cypress GitHub actions and tidy E2E tests Remove Express Cypress references May 12, 2026
@amoore108 amoore108 changed the title Remove Express Cypress references Remove Express Cypress references + Actions cleanup May 12, 2026
@amoore108

Copy link
Copy Markdown
Contributor Author

Sorry, a bunch of the changes here are moving the existing Next e2es into the 3 new folders.

@amoore108
amoore108 marked this pull request as ready for review May 12, 2026 10:02
@amoore108
amoore108 requested review from a team as code owners May 12, 2026 10:02
@amoore108
amoore108 merged commit 73a9742 into latest May 14, 2026
13 checks passed
@amoore108
amoore108 deleted the NOTICKET-remove-express-github-actions branch May 14, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants