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

Component tests not run when clicking 'Run n specs' button #8203

Closed
ghost opened this issue Aug 6, 2020 · 8 comments · Fixed by #8703
Closed

Component tests not run when clicking 'Run n specs' button #8203

ghost opened this issue Aug 6, 2020 · 8 comments · Fixed by #8703
Labels
type: unexpected behavior User expected result, but got another

Comments

@ghost
Copy link

ghost commented Aug 6, 2020

Current behavior:

I'm using the cypress-vue-unit-test via cypress-experimental. My tests show up in the Dashboard under COMPONENT TESTS. However when I click "Run All Tests" none of the component tests run. When I use the Search box to narrow down my list to just component tests and click "Run X specs" I get "No tests found in your file:"

Desired behavior:

COMPONENT TESTS run just like INTEGRATION TESTS.

Test code to reproduce

Add a component tests and try to run it with the Run All Tests button. See https://github.com/bahmutov/cypress-vue-unit-test

Versions

Cypress 4.12.1
Windows 10
Chrome 78

┆Issue is synchronized with this Jira Features by Unito

@jennifer-shehane
Copy link
Member

Running component tests with the 'Run all Specs' button is not currently supported. As this is still experimental, the work for this has yet to be done.

The reasoning behind this is that component tests run completely differently integration tests, so if the filter were to match some integration tests and component tests combined - they cannot run back to back together.

We'll leave this open as feature work to do for component testing.

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Aug 7, 2020
@jennifer-shehane jennifer-shehane added the type: unexpected behavior User expected result, but got another label Aug 7, 2020
@jennifer-shehane jennifer-shehane changed the title Component tests not "found" by Dashboard Component tests not run when clicking 'Run n specs' button Aug 7, 2020
@ghost
Copy link
Author

ghost commented Aug 7, 2020

Thank you for the explanation. What's interesting is that using the command line "cypress run --record ..." actually DOES run all the component tests (which is great!). Looking forward to additional support as I think this is an awesome way to test VueJS components.

@bahmutov
Copy link
Contributor

bahmutov commented Aug 7, 2020

@jennifer-shehane is right, we don't know how to run component tests mixed with the integration specs, so we postponed this feature until we figure it out. As additional detail: when using cypress run every spec is executed one by one, just like clicking on the spec name by itself during cypress open, thus it it not a problem to run both integration and component specs.

@ambrt
Copy link

ambrt commented Sep 1, 2020

@bahmutov until we figure it out

Until its possible, allow OR situation - "Run all components OR all integration tests".

That would allow those who use components only to test all of their components specs, and wouldn't interfere with those who do integration tests.

@bahmutov
Copy link
Contributor

bahmutov commented Sep 1, 2020 via email

@ambrt
Copy link

ambrt commented Sep 2, 2020

I wish but for now we can’t even concat unit tests like that, so it requires some planning and thinking

Ok,np.

@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Oct 13, 2020
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Nov 2, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Nov 3, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 3, 2020

The code for this is done in cypress-io/cypress#8703, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2020

Released in 5.6.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: unexpected behavior User expected result, but got another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants