Skip to content

[Bug]: playwright --ct in the workspaces root #34370

@Diokuz

Description

@Diokuz

Version

latest

Steps to reproduce

  1. create repo with yarn workspaces
  2. yarn create playwright --ct

Expected behavior

I get playwright component testing setup

Actual behavior

error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).

Additional context

It works if I run yarn create playwright --ct -W, but in that case it creates a directory with name -W :)

Image

Maybe it is not the correct way to use playwright ct? But we are not really want to create playwright folder for each of our workspaces (we have hundreds of them). We just want to create one common setup per repo and use playwright ct with portable stories: https://storybook.js.org/blog/portable-stories-for-playwright-ct/

Environment

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 80.06 MB / 16.00 GB
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.16.0/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
  IDEs:
    VSCode: 1.96.2 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions