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
Allow component tests to be run via the module API #16302
Comments
Yeah, this is a good idea. We'll have to work through the specifics on what the API will look like to run component tests via the Module API. |
Hey @DamienCassou, thanks for the issue report! I proposed an API below. Looking for input before going ahead and scheduling this work. @brian-mann, any changes needed here? MotivationPassing Proposed APIWe'll do an options-object approach and pass that through to run/open. Since 7.x we have the concept of Cypress's module API is options-based, so we should continue that pattern and add another property to the options object. The property We would extend the existing options defined in the module API docs with the following: Property: // Run/open Component testing
cypress.run({ testingType: 'component' })
cypress.open({ testingType: 'component' })
// Run/open E2E testing
cypress.run({ testingType: 'e2e' })
cypress.open({ testingType: 'e2e' })
// Defaults to e2e
cypress.run({})
cypress.open({}) |
The code for this is done in cypress-io/cypress#16368, but has yet to be released. |
I think it has been release in 7.3.0. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
We start our Cypress tests by using the Cypress module API. This has worked fine for us until the release Cypress 7 and its Component Test Runner. We don't know how to run the component tests from the API anymore.
Desired behavior
I expect to be able to write
cypress.runCT({...})
in my JS script to run the component tests.Versions
Cypress 7.2.0
The text was updated successfully, but these errors were encountered: