Skip to content

Migrate errorPage404 to Playwright with CI setup#14064

Merged
MeriemMechri merged 24 commits into
latestfrom
test-migration
Jun 4, 2026
Merged

Migrate errorPage404 to Playwright with CI setup#14064
MeriemMechri merged 24 commits into
latestfrom
test-migration

Conversation

@MeriemMechri
Copy link
Copy Markdown
Contributor

@MeriemMechri MeriemMechri commented May 26, 2026

Resolves JIRA: WS-2715

Summary

A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.

Code changes

  • Added Playwright config at playwright.config.ts.
  • Added/updated Playwright test coverage for error page type at errorPage404.spec.ts.
  • Added Playwright CI workflow at simorgh-e2e-playwright-page-types.yml.
  • Added team-facing Playwright docs at README.md.

Testing

  1. List the steps required to test this PR.

Useful Links

Copilot AI review requested due to automatic review settings May 26, 2026 08:29
@MeriemMechri MeriemMechri requested review from a team as code owners May 26, 2026 08:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces Playwright E2E coverage for the errorPage404 page type in the ws-nextjs-app, along with CI automation to run the new Playwright suite on pull requests.

Changes:

  • Added Playwright (@playwright/test) to ws-nextjs-app and committed updated lockfile entries.
  • Introduced Playwright config, documentation, and a new errorPage404 Playwright test suite + suite definitions.
  • Added a GitHub Actions workflow to build/start the Next.js app and execute the Playwright page-type tests on PRs.

Reviewed changes

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

Show a summary per file
File Description
yarn.lock Adds Playwright-related dependencies to the workspace lockfile.
ws-nextjs-app/test-results/.last-run.json Adds Playwright run output artifact (currently committed).
ws-nextjs-app/playwright/README.md Documents how to run/debug Playwright E2Es for the Next.js app.
ws-nextjs-app/playwright/pageTypes/errorPage404/suites.ts Defines canonical/AMP suite inputs for errorPage404 tests.
ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Implements Playwright E2E assertions for errorPage404.
ws-nextjs-app/playwright.config.ts Adds Playwright runner configuration (baseURL/env selection, retries, reporter).
ws-nextjs-app/package.json Adds Playwright scripts and @playwright/test dev dependency.
.github/workflows/simorgh-e2e-playwright-page-types.yml New CI workflow to run Playwright page-type E2Es in PRs.

Comment thread ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Outdated
Comment thread ws-nextjs-app/test-results/.last-run.json Outdated
Comment thread ws-nextjs-app/package.json Outdated
Comment thread ws-nextjs-app/playwright.config.ts Outdated
Comment thread .github/workflows/simorgh-e2e-playwright-page-types.yml Outdated
@MeriemMechri MeriemMechri marked this pull request as draft May 26, 2026 08:36
@MeriemMechri MeriemMechri self-assigned this May 26, 2026
@MeriemMechri MeriemMechri marked this pull request as ready for review May 30, 2026 10:46
@MeriemMechri MeriemMechri requested a review from Copilot May 30, 2026 10:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 15 changed files in this pull request and generated 5 comments.

Comment thread .github/workflows/simorgh-e2e-playwright-page-types.yml Outdated
Comment thread ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Outdated
Comment thread ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Outdated
Comment thread ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Outdated
Comment thread ws-nextjs-app/cypress/support/config/envs.ts Outdated
@MeriemMechri MeriemMechri requested a review from andrewscfc June 2, 2026 11:01
Comment thread .github/workflows/simorgh-e2e-playwright-page-types.yml Outdated
Comment thread .github/workflows/simorgh-e2e-playwright-page-types.yml Outdated
Comment thread ws-nextjs-app/cypress/support/config/envs.ts Outdated
Comment thread ws-nextjs-app/playwright/pageTypes/errorPage404/errorPage404.spec.ts Outdated
test.describe('errorPage404', () => {
const allSuites = [
...errorPage404Suites.canonical,
...errorPage404Suites.amp,
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.

should this include lite too? If cypress didn't have it, it maybe doesn't need to be in this PR

Comment thread ws-nextjs-app/playwright/README.md Outdated
Comment thread ws-nextjs-app/package.json Outdated
Comment thread ws-nextjs-app/playwright.config.ts Outdated
Copy link
Copy Markdown
Contributor

@andrewscfc andrewscfc left a comment

Choose a reason for hiding this comment

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

Looks good, I did think as I read that for error page tests the same could probably be achieved just with integration tests?

I remember certainly with Cypress you only truly need them when a test relies and clientside JS behaviour, e.g. lazy loading of resources or mult-step journeys (e.g. cookie banner, login etc)

I guess the gap with integration tests is I don't think they can run against deployed environments atm?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 15 changed files in this pull request and generated 6 comments.

@MeriemMechri MeriemMechri requested a review from andrewscfc June 4, 2026 11:15
@MeriemMechri MeriemMechri merged commit 395cf6c into latest Jun 4, 2026
15 checks passed
@MeriemMechri MeriemMechri deleted the test-migration branch June 4, 2026 15:43
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.

5 participants