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
feat: Re-introduce Run All specs for End to End under experimentalRunAllSpecs flag #24745
Conversation
Thanks for taking the time to open a PR!
|
Doing some testing, collecting my feedback here. Edit: I've fixed these in #24746. Please review. Feedback## Button position on inline spec list is inconsistentThe icons appear in different positions. Should it align right? simplescreenrecorder-2022-11-21_10.29.50.mp4Another example: css.mp4I think it should always be a fixed width from the right. That's what the designs hint at. Experimental flag typesCurrent I can set export default = {
experimentalRunAllSpecs: truer
} IDE says it's valid, but Cypress throws an error. |
* wip run-all-specs-ui * added component tests for specs-list, inline-specs-list, and run-all-specs * updated tests for specslist, inlinespeclist, and runAllSpecs * simplify test * make prop with default value optional * enable run all specs * use named slot for clarify * use Record type * remove un-necessary dynamic component * use group and hover to inline css * fix tests * fix tests and use snapshot for style testing Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
* update ui [skip ci] * change types to reflect run all specs is e2e only
hocus-fill-color="indigo-100" | ||
class="inline-flex align-text-bottom" | ||
data-cy="play-button" | ||
@click.stop="emits('runAllSpecs')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this click handler should be on the button, not the icon. When I use the keyboard on the button it doesn't rerun specs for me, it just toggles the folder open and closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, moving the handler didn't help, I think because the parent is using @click.capture
to manage the toggle. That code would need some extra logic to not toggle if the click event came from the button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the listener anyway, it should be on the button. There is a follow up for better a11y.
class="font-normal text-sm inline-flex" | ||
data-cy="tooltip-content" | ||
> | ||
Run {{ specNumber }} specs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it's already in the main Spec Explorer, we can do that here.
Run {{ specNumber }} specs | |
{{ t('specPage.runAllSpecs', specNumber) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
cy.findByTestId('play-button').should('be.visible') | ||
}) | ||
|
||
it('Renders styles correctly', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future let's use a Percy snapshot for this kind of thing and not assert all these CSS values. It's not important whether or not these exact values are used for these elements, what matters is that visual appearance is as expected.
Some known windows linting fails, fixed by #24758 All other pipelines ✔️, merging. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Adds a new experimental flag,
experimentalRunAllSpecs
, for End to End Testing. Enable it incypress.config
:Additional details
This PR adds back in support for running multiple tests sequentially in Open Mde for End to End testing. It can be accessed from both the Specs page and the Runner page in the Cypress App:
Steps to test
Open Cypress in Open Mode. The Specs page and Runner page should be have "Run N Specs" labels that are revealed when you hover a directory. Clicking the button will re-open the browser and execute all the specs sequentially.
You can also use the text search to only execute a sub-set of specs. Saving any of the specs will re-execute all the specs that matched your criteria (search, directory, or both).
Note: It's not fully a11y yet. You cannot do Run All Specs with a keyboard only yet. I filed an issue for a fast follow: #24748. If there's a trivial fix, that'd be great.
How has the user experience changed?
See above.
PR Tasks
cypress-documentation
? https://github.com/chore: add experimentalRunAllSpecs experiment docs cypress-documentation#4860type definitions
?