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

fix: selector playground copy full command #22097

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Jun 3, 2022

User facing changelog

Selector Playground "copy to clipboard" now copies full command rather than just the selector

Additional details

In 9.x, the "copy to clipboard" button would copy the full command (method + selector). In 10.x, we were only copying the selector. This PR brings us back in to parity with 9.x, and also adds an active state to the playground activator when opened.

Steps to test

Open any Cypress project and click through to the selector playground. Hitting the "copy to clipboard" button would only copy the selector "body" and not "cy.get('body')" (same for contains).

How has the user experience changed?

Before:

Screen.Recording.2022-06-03.at.11.44.57.AM.mov

After:

Screen.Recording.2022-06-03.at.11.41.50.AM.mov

PR Tasks

  • 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?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 3, 2022

Thanks for taking the time to open a PR!

Copy link
Contributor

@mike-plummer mike-plummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated selector playground copy & print behaviors work as expected in E2E and CT. Only question I have regards closing the loop on your "tooltip" comment in the Issue. Did Ryan decide it should be dropped?

@ZachJW34
Copy link
Contributor Author

ZachJW34 commented Jun 3, 2022

@mike-plummer For the sake of getting this in I punted the tooltip. I reached out to design and if they want a tooltip I'll create an issue for it

@cypress
Copy link

cypress bot commented Jun 3, 2022



Test summary

37553 0 454 0Flakiness 4


Run details

Project cypress
Status Passed
Commit f4c595b
Started Jun 6, 2022 9:03 PM
Ended Jun 6, 2022 9:20 PM
Duration 17:03 💡
OS Linux Debian - 10.11
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

commands/actions/click.cy.js Flakiness
1 ... > scroll-behavior > can scroll to and click elements in html with scroll-behavior: smooth
commands/xhr.cy.js Flakiness
1 ... > logs request + response headers
next.cy.ts Flakiness
1 Working with next-11 > should detect new spec
cypress/proxy-logging.cy.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second

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

Copy link
Contributor

@rachelruderman rachelruderman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried, tested and true! Nice job 🎉

@ZachJW34 ZachJW34 merged commit e58ec7a into develop Jun 6, 2022
@ZachJW34 ZachJW34 deleted the zachw/selector-playground-copy branch June 6, 2022 22:38
@tgriesser tgriesser added the PATCH label Jun 7, 2022
@mjhenkes mjhenkes removed the PATCH label Jun 10, 2022
BeijiYang pushed a commit to BeijiYang/cypress that referenced this pull request Jun 23, 2022
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

Successfully merging this pull request may close these issues.

Selector playground only copies the selector, not the command like before (v10)
5 participants