cypress icon indicating copy to clipboard operation
cypress copied to clipboard

fix: hitting enter in the 'Create Blank Spec' dialog will create the spec

Open warrensplayer opened this issue 1 year ago • 3 comments

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 a type 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 the form 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 1_click_new_spec

This opens the new blank spec modal if your project already has specs in it 2_new_spec_modal

Type a name for the spec file or leave as the default 3_type_spec_name

Hit the "Enter" or "Return" key and your new spec will be created just like clicking the "Create spec" button 4_new_blank_spec_created

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?

warrensplayer avatar Aug 05 '22 21:08 warrensplayer

Thanks for taking the time to open a PR!

cypress-bot[bot] avatar Aug 05 '22 21:08 cypress-bot[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 05 '22 21:08 CLAassistant



Test summary

37846 0 469 0Flakiness 14


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 Flakiness
1 cy.origin assertions > #consoleProps > .should() and .and()
commands/xhr.cy.js Flakiness
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

cypress[bot] avatar Aug 05 '22 22:08 cypress[bot]