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

No buttons if tests are not run #74

Open
archigo opened this issue Jul 4, 2019 · 4 comments
Open

No buttons if tests are not run #74

archigo opened this issue Jul 4, 2019 · 4 comments

Comments

@archigo
Copy link

archigo commented Jul 4, 2019

The buttons do not show up if you cancel the test run before it finishes.

It would be much more useful if you could open the tests you want, cancel them because you don't want to run them all, and then click the one you want.

As it is, whenever you want to change the test you run (if you use single test button) you have wait for all the tests to run before you can select a single test again.

@dialex
Copy link

dialex commented Aug 22, 2019

I had the same issue. However, even after running all tests, when I click the buttons nothing happens, it just expand/collapses the steps of that test :(

@haskelcurry
Copy link

Thanks for your great work, I find it very useful and even crucial feature for Cypress... But I just can't get the buttons to appear :( I use it with Angular, followed the install guide, and nothing.
Any progress on this?

@lukeapage
Copy link
Contributor

@dialex @mtuzinskiy for the buttons not appearing at all, I suspect its a seperate issue.

For the buttons appearing after a run - this is also very annoying for us - if we have a spec that takes 8 minutes to run, waiting 8 minutes in order to control things makes the plugin not usable.
It attaches after because it litterally attaches them using after -> https://github.com/bahmutov/cypress-skip-and-only-ui/blob/master/src/support.tsx#L61

And if you change it to before() and add retry behaviour, the buttons successfully render.. however it seems that cy.task() behaviour when tests have been stopped is to not execute the task. When the tests have all completed and you call cy.task() it runs.

I guess this can be solved the same way as the cypress snapshot plugin - it sets up its own websocket between the front end and its task to communicate so it doesn't need to use cy.task().

@bahmutov are there plans to make this plugin work better, or implement this in core (where it would probably be easier) ? or will this stay in userland and if so, would you accept my suggestion or do you have a better idea?

@bahmutov
Copy link
Owner

@lukeapage I think this is very hacky solution (adding buttons after tests finish, etc). While this will stay userspace I want to implement a feature in Cypress core that would give YOUR plugins file a list of all tests found in the spec files after it has been processed by Mocha but before Cypress starts running them. See this branch https://github.com/cypress-io/cypress/tree/let-user-change-tests
and this blog post how one could dynamically filter Mocha tests https://glebbahmutov.com/blog/filter-mocha-tests/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants