Skip to content

chore(samples): migrate search-vuejs from Cypress to Playwright#7474

Open
alexprudhomme wants to merge 3 commits intomainfrom
KIT-5651-move-search-vuejs-to-playwright
Open

chore(samples): migrate search-vuejs from Cypress to Playwright#7474
alexprudhomme wants to merge 3 commits intomainfrom
KIT-5651-move-search-vuejs-to-playwright

Conversation

@alexprudhomme
Copy link
Copy Markdown
Contributor

@alexprudhomme alexprudhomme commented Apr 21, 2026

KIT-5651

Problem

The samples/atomic/search-vuejs sample uses Cypress for E2E testing and points to an org that no longer works. The tests are also not run in CI.

Solution

  • Migrate E2E tests from Cypress to Playwright
  • Switch the sample to use the searchuisamples org and simplify the layout to match other search samples
  • Add the Playwright tests to the CI pipeline

Reviewable by commit

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: ee87dbd

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

@svcsnykcoveo
Copy link
Copy Markdown

svcsnykcoveo commented Apr 21, 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.

@chromatic-com
Copy link
Copy Markdown

chromatic-com Bot commented Apr 21, 2026

Tip

All tests passed and all changes approved!

🟢 UI Tests: 356 tests unchanged
🟢 UI Review: 356 stories published -- no changes
Storybook icon Storybook Publish: 356 stories published

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

@coveo/atomic

npm i https://pkg.pr.new/@coveo/atomic@7474

@coveo/atomic-hosted-page

npm i https://pkg.pr.new/@coveo/atomic-hosted-page@7474

@coveo/atomic-legacy

npm i https://pkg.pr.new/@coveo/atomic-legacy@7474

@coveo/atomic-react

npm i https://pkg.pr.new/@coveo/atomic-react@7474

@coveo/auth

npm i https://pkg.pr.new/@coveo/auth@7474

@coveo/bueno

npm i https://pkg.pr.new/@coveo/bueno@7474

@coveo/create-atomic

npm i https://pkg.pr.new/@coveo/create-atomic@7474

@coveo/create-atomic-component

npm i https://pkg.pr.new/@coveo/create-atomic-component@7474

@coveo/create-atomic-component-project

npm i https://pkg.pr.new/@coveo/create-atomic-component-project@7474

@coveo/create-atomic-result-component

npm i https://pkg.pr.new/@coveo/create-atomic-result-component@7474

@coveo/create-atomic-rollup-plugin

npm i https://pkg.pr.new/@coveo/create-atomic-rollup-plugin@7474

@coveo/headless

npm i https://pkg.pr.new/@coveo/headless@7474

@coveo/headless-react

npm i https://pkg.pr.new/@coveo/headless-react@7474

@coveo/shopify

npm i https://pkg.pr.new/@coveo/shopify@7474

commit: ee87dbd

@github-actions
Copy link
Copy Markdown
Contributor

🔗 Scratch Orgs ready to test this PR:

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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/atomic/search-vuejs sample E2E coverage from Cypress to Playwright, updates the sample configuration to use the searchuisamples org, and wires the new Playwright suite into CI.

Changes:

  • Added Playwright config + smoke test for the Atomic Vue sample and removed Cypress tests/config.
  • Updated the Vue sample’s Atomic configuration and simplified facets/results UI to align with other search samples.
  • Added a dedicated CI job and composite action to run the Vue Playwright tests.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
samples/atomic/search-vuejs/tests/smoke.spec.ts New Playwright smoke test for core search flows and console error assertions.
samples/atomic/search-vuejs/playwright.config.ts Playwright runner config and dev-server bootstrapping for the sample.
samples/atomic/search-vuejs/package.json Adds Playwright scripts/dependency; removes Cypress dependency.
samples/atomic/search-vuejs/src/components/SearchPage.vue Switches org/token; simplifies <atomic-search-interface> attributes.
samples/atomic/search-vuejs/src/components/SearchPageFacets.vue Updates facets to match the new sample org and align with other samples.
samples/atomic/search-vuejs/src/components/TopBar.vue Removes price sorting options from the sample top bar.
samples/atomic/search-vuejs/src/components/ResultsList.vue Switches result list display mode (grid → list).
samples/atomic/search-vuejs/src/templates/result-template.html Simplifies result template and switches excerpt/date rendering.
samples/atomic/search-vuejs/.gitignore Ignores Playwright output directories/caches.
samples/atomic/search-vuejs/cypress.config.ts Removes Cypress configuration.
samples/atomic/search-vuejs/cypress/e2e/smoke-test.cypress.cy.ts Removes Cypress smoke test.
samples/atomic/search-vuejs/cypress/support/e2e.ts Removes Cypress support bootstrap file.
samples/atomic/search-vuejs/cypress/support/commands.ts Removes Cypress commands placeholder.
samples/atomic/search-vuejs/cypress/fixtures/example.json Removes Cypress fixture placeholder.
samples/atomic/search-vuejs/cypress/tsconfig.json Removes Cypress TS config.
pnpm-lock.yaml Locks Playwright dependency; removes Cypress lock entry for this sample.
.github/workflows/ci.yml Adds a CI job to run Atomic Vue Playwright tests and gates PR/merge-queue validity on it.
.github/actions/playwright-atomic-search-vuejs/action.yml New composite action to run the Vue Playwright suite and upload reports on failure.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +7 to +12
const consoleErrors: string[] = [];
page.on('console', (msg) => {
if (msg.type() === 'error') {
consoleErrors.push(msg.text());
}
});
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The test only collects console messages of type error, but Playwright reports uncaught runtime exceptions via the pageerror event. As written, the smoke test can pass even if the app throws an unhandled exception. Consider also listening to page.on('pageerror', ...) and failing the test (or adding it to the same filtered error list) so the migration preserves Cypress' "uncaught exception" coverage.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +7
inputs:
github-token:
description: The GitHub token for accurately detecting a build vs a re-run build
required: false
default: ''
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This composite action declares a github-token input but never uses it. To avoid confusion for callers, either remove the unused input or wire it into whatever rerun/build detection logic it’s intended for (matching how other actions in this repo handle it).

Suggested change
inputs:
github-token:
description: The GitHub token for accurately detecting a build vs a re-run build
required: false
default: ''

Copilot uses AI. Check for mistakes.
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.

3 participants