cypress
cypress copied to clipboard
fix: hitting enter in the 'Create Blank Spec' dialog will create the spec
Fixes #21815
- Closes https://github.com/cypress-io/cypress/issues/21815
User facing changelog
In the "Create Blank Spec" dialog, pressing enter or return when the focus is on the spec path input field will create the blank spec.
Additional details
- This appears to the first use of the
form
tag in the Cypress app. - The change was isolated to just wrap the one input field that makes up the form in this modal.
- Currently, the
Button.vue
component (packages/frontend-shared/src/components/Button.vue) does not have atype
attribute. All buttons in the app default to a type of "submit". This is not the correct semantics for buttons that are not part of a form. I did not want to make any changes to such a commonly used component for this simple issue. Additional uses of theform
tag will want to consider updating the "Button.vue" component to allow for setting the type appropriately.
Steps to test
Click the "New Spec" button
This opens the new blank spec modal if your project already has specs in it
Type a name for the spec file or leave as the default
Hit the "Enter" or "Return" key and your new spec will be created just like clicking the "Create spec" button
How has the user experience changed?
PR Tasks
- [x] Have tests been added/updated?
- [ ] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
- [na] Has a PR for user-facing changes been opened in
cypress-documentation
? - [na] Have API changes been updated in the
type definitions
?
Thanks for taking the time to open a PR!
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
- Become familiar with the Code Review Checklist for guidelines on coding standards and what needs to be done before a PR can be merged.
Test summary
Run details
Project | cypress |
Status | Passed |
Commit | 880cdd7497 |
Started | Aug 10, 2022 11:40 AM |
Ended | Aug 10, 2022 12:03 PM |
Duration | 22:57 💡 |
OS | Linux Debian - 11.3 |
Browser | Multiple |
View run in Cypress Dashboard ➡️
Flakiness
![]() |
e2e/origin/commands/assertions.cy.ts ![]() |
1 ![]() |
|
---|---|---|---|
1 | cy.origin assertions > #consoleProps > .should() and .and() | ||
![]() |
commands/xhr.cy.js ![]() |
4 ![]() |
|
1 | ... > logs request + response headers | ||
2 | ... > logs Method, Status, URL, and XHR | ||
3 | ... > logs response | ||
4 | ... > logs request + response headers | ||
This comment includes only the first 5 flaky tests. See all 14 flaky tests in the Cypress Dashboard. |
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard