Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: use pnpm add for ct dependency scaffolding #29056

Merged

Conversation

MikeMcC399
Copy link
Contributor

Additional details

Cypress Component Testing was instructing the user to add framework dependencies using pnpm install when the underlying project was using pnpm as package manager. This was inconsistent with the pnpm cli documentation which lists pnpm add <pkg> as the appropriate command to add a package.

Steps to test

  • OS: Ubuntu 22.04.4 LTS
  • Node.js: is 18.17.1

Prepare project cy-pnpm-ct

npm install pnpm@latest -g
mkdir cy-pnpm-ct
cd cy-pnpm-ct
git init
pnpm init
pnpm add cypress -D

Local Cypress build and run

yarn
yarn start

In the Cypress Launchpad use "Add project" to select the directory cy-pnpm-ct
Select "Component Testing"
Select "Front-end framework" > "Vue CLI (Vue 3)"
Click "Next step"
Note the instruction

pnpm add -D @vue/cli-service vue

Paste the instruction into a separate terminal window which is open in the directory cy-pnpm-ct and execute it.

Note that it runs successfully.

Back in the Cypress Launchpad confirm that the status message "You've successfully installed all required dependencies." is shown.

How has the user experience changed?

When scaffolding Component Testing for a project using pnpm as package manager the Cypress Launchpad previously showed the instruction to install the required dependencies in the form

pnpm install -D

and now it shows the instruction in the following form:

pnpm add -D

BEFORE

ct pnpm install


AFTER

ct pnpm add

PR Tasks

  • Have tests been added/updated?
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
    The documentation Component Testing > Getting Started only covers npm (not Yarn or pnpm) and does not cover the case where dependencies have not yet been installed, so the changes in this PR do not affect any existing documentation.
  • [na] Have API changes been updated in the type definitions?

@cypress-app-bot
Copy link
Collaborator

@jennifer-shehane
Copy link
Member

Seems we can't get the tests to pass due to recent tests added, we're looking into it: #29072

@jennifer-shehane
Copy link
Member

The issue with the failing tests has been resolved, so going to work on merging this in. Hold off on pulling in develop unless there are conflicts.

@jennifer-shehane jennifer-shehane merged commit 8253613 into cypress-io:develop Mar 12, 2024
67 checks passed
@MikeMcC399 MikeMcC399 deleted the issue-29052-ct-pnpm-scaffolding branch March 12, 2024 17:28
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 13, 2024

Released in 13.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.7.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component test pnpm scaffolding uses pnpm install not add
4 participants