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

docs: add information about 3rd party framework definition warnings #5170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions docs/guides/component-testing/third-party-definitions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When configuring a project to use Component Testing, Cypress will load any
dependencies following this naming convention from the project's `node_modules`
and present them as framework options.

A simple example of a Framework Defintion for the
A simple example of a Framework Definition for the
[Solid.js](https://www.solidjs.com/) library is shown below. We generally
recommend naming this `definition.cjs`. In our
[official template](https://github.com/cypress-io/cypress-ct-definition-template),
Expand Down Expand Up @@ -167,17 +167,38 @@ indicating it's a third party definition.

<DocsImage
src="/img/guides/component-testing/framework-definition-1.png"
alt="custom framework definition"
alt="Project setup screen. Custom framework definition for Solid.js
appears in the dropdown with a community label"
/>

We defined the `dependencies`, which are also correctly handled - we haven't
installed them all, so Cypress is prompting us to do so:

<DocsImage
src="/img/guides/component-testing/framework-definition-2.png"
alt="required dependencies"
alt="Development dependencies screen."
/>

From Cypress version 12.10.0, if there is a problem loading or
parsing a framework definition, Cypress will display a warning:

<DocsImage
src="/img/guides/component-testing/framework-definition-errors.png"
alt="Project setup screen: an error states that this project
has some community framework definitions installed
that could not be parsed. They are located at the following paths.
See the framework definition documentation for more information
about creating, installing, and troubleshooting third party definitions."
/>

To see more detailed error information, use the
`scaffold-config:ct-detect-third-party` namespace for
[logging](/guides/references/troubleshooting#Print-DEBUG-logs), like this:

```bash
DEBUG=cypress:scaffold-config:ct-detect-third-party npx cypress open
```

## Mount Adapter

The second part of defining a Framework Definition is the Mount Adapter. This is
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.