Skip to content

Replace Cypress with Playwright in samples/headless-ssr/search-nextjs#7245

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/replace-cypress-with-playwright-another-one
Draft

Replace Cypress with Playwright in samples/headless-ssr/search-nextjs#7245
Copilot wants to merge 4 commits intomainfrom
copilot/replace-cypress-with-playwright-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

  • Replace Cypress with Playwright in samples/headless-ssr/search-nextjs
  • Create playwright.config.ts, e2e test files, and shared fixtures
  • Update package.json dependencies and scripts
  • Update .gitignore for Playwright
  • Create Playwright CI action and update ci.yml
  • Remove Cypress CI action and config
  • Address code review feedback (use resultListSelector constant, replace waitForTimeout)
  • Resolve merge conflicts with main

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 16, 2026 20:34
…nextjs

Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
…tests

Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace Cypress with Playwright in headless SSR examples Replace Cypress with Playwright in samples/headless-ssr/search-nextjs Mar 16, 2026
Copilot AI requested a review from louis-bompart March 16, 2026 20:39
@louis-bompart louis-bompart marked this pull request as ready for review March 16, 2026 20:59
@louis-bompart louis-bompart marked this pull request as draft March 16, 2026 20:59
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 migrates the samples/headless-ssr/search-nextjs sample’s end-to-end coverage from Cypress to Playwright and wires the new Playwright run into the repository CI workflow.

Changes:

  • Replaced Cypress E2E setup/tests with Playwright configuration, fixtures, and specs for the NextJS SSR Search sample.
  • Updated the sample’s package.json scripts/devDependencies and .gitignore to reflect Playwright usage.
  • Updated CI to run the new Playwright composite action instead of the Cypress one.

Reviewed changes

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

Show a summary per file
File Description
samples/headless-ssr/search-nextjs/playwright.config.ts Adds Playwright test runner config and webServer startup for the sample.
samples/headless-ssr/search-nextjs/package.json Switches E2E scripts from Cypress to Playwright and updates devDependencies.
samples/headless-ssr/search-nextjs/e2e/search.fixture.ts Introduces shared Playwright helpers/selectors and SSR response parsing helper.
samples/headless-ssr/search-nextjs/e2e/smoke.spec.ts Adds Playwright smoke coverage for SSR/CSR rendering and hydration behavior.
samples/headless-ssr/search-nextjs/e2e/ssr-search-parameter-manager.spec.ts Adds Playwright coverage for search parameter manager / history behaviors.
samples/headless-ssr/search-nextjs/.gitignore Removes Cypress artifact ignores and adds Playwright report/test artifact ignores.
samples/headless-ssr/search-nextjs/cypress.config.ts Removes Cypress configuration.
samples/headless-ssr/search-nextjs/cypress/e2e/utils.ts Removes Cypress test utilities.
samples/headless-ssr/search-nextjs/cypress/e2e/smoke.cy.ts Removes Cypress smoke tests (including vitals audit).
samples/headless-ssr/search-nextjs/cypress/e2e/ssr-search-parameter-manager.cy.ts Removes Cypress parameter manager tests.
.github/workflows/ci.yml Replaces the Cypress SSR Search NextJS job/action with a Playwright-based job in a Playwright container.
.github/actions/playwright-headless-ssr-search-nextjs/action.yml Adds composite action to run the sample’s Playwright tests.
.github/actions/cypress-headless-ssr-search-nextjs/action.yml Removes composite action previously used to run Cypress tests.
pnpm-lock.yaml Updates lockfile for dependency changes and introduces an additional Playwright resolution.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

timeout: 7 * 1000,
},
webServer: {
command: 'npm run prod',
Comment thread pnpm-lock.yaml Outdated
Comment on lines 20366 to 20371
'@vitest/browser-playwright@4.0.10(msw@2.11.4(@types/node@25.0.10)(typescript@5.9.3))(playwright@1.58.0-alpha-1763757971000)(vite@7.2.2(@types/node@25.0.10)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.30.1)(sass@1.97.3)(terser@5.46.0)(yaml@2.8.2))(vitest@4.0.10)':
dependencies:
'@vitest/browser': 4.0.10(msw@2.11.4(@types/node@25.0.10)(typescript@5.9.3))(vite@7.2.2(@types/node@25.0.10)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.30.1)(sass@1.97.3)(terser@5.46.0)(yaml@2.8.2))(vitest@4.0.10)
'@vitest/mocker': 4.0.10(msw@2.11.4(@types/node@25.0.10)(typescript@5.9.3))(vite@7.2.2(@types/node@25.0.10)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.30.1)(sass@1.97.3)(terser@5.46.0)(yaml@2.8.2))
playwright: 1.56.1
playwright: 1.58.0-alpha-1763757971000
tinyrainbow: 3.0.3
}

async function getResultTitles(page: Page) {
const items = page.locator('.result-list li');
Copilot AI temporarily deployed to Prerelease (CDN) March 16, 2026 21:03 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

🔗 Scratch Orgs ready to test this PR:

@alexprudhomme
Copy link
Copy Markdown
Contributor

alexprudhomme commented Apr 8, 2026

Hey @copilot-swe-agent 👋 ✅ This PR does not need a changeset file — you don't have one currently, so it's perfect. This PR only migrates tests in a sample app (Cypress → Playwright), which doesn't affect any published packages. For more info on when changesets are needed, see the Changesets README.

@louis-bompart
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

…ss-with-playwright-another-one

# Conflicts:
#	.github/actions/cypress-headless-ssr-search-nextjs/action.yml
#	.github/workflows/ci.yml
#	pnpm-lock.yaml
#	samples/headless-ssr/search-nextjs/package.json
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

⚠️ No Changeset found

Latest commit: 6e8c52e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in commit 6e8c52ea7. The conflicts were in .github/workflows/ci.yml (job name + needs arrays), samples/headless-ssr/search-nextjs/package.json (devDependencies), pnpm-lock.yaml (regenerated), and the deleted Cypress action file. I also adopted main's single-quote style and added the new publish-preview job reference from main.

@svcsnykcoveo
Copy link
Copy Markdown

svcsnykcoveo commented Apr 14, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants