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: prevent RunCard styles from leaking outside of component #22014

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

marktnoonan
Copy link
Contributor

@marktnoonan marktnoonan commented Jun 1, 2022

User facing changelog

Visiting the Runs page will no longer cause list styles to look incorrect in the Spec Runner page and Header.

Desired Behavior

In this situation, Cypress should not show extra dots in the Runner UI that don’t belong there.

Additional details

This is caused by styles leaking from this component: packages/app/src/runs/RunCard.vue and the fix is a one-line change, to add a scoped attribute to the style tag here.

Steps to test

Before checking out this branch:

  1. Open the cypress app
  2. Visit the Runs page
  3. Visit the Specs List
  4. Open a Spec
  5. See bad styles
  6. Refresh
  7. See good styles
  8. Visit the Runs page and then visit a spec again - the bad styles return as soon as the Runs page mounts, you can see them pop in briefly during the navigation.

Repeat these steps after checking out this branch and the problem should be fixed.

How has the user experience changed?

There are extra dots and big spaces between items in the command log, and extra dots on the far left of the inline specs list, that appear when you visit a spec after visiting the Specs.

Screen Shot 2022-05-23 at 2 53 38 PM

Some other side effects caused by same leaking styles - any list longer than one item is affected. It makes the docs menu look nested and the browser list look misaligned.

Screen Shot 2022-05-25 at 6 43 01 AM

Screen Shot 2022-05-25 at 6 42 56 AM

This PR fixes all of that so that things look as expected whether we have visited the runs page or not. Here is a screenshot of part of the app after visiting the runs page:

Screen Shot 2022-06-01 at 4 38 50 PM

PR Tasks

  • [na] 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) - no tag yet, not sure which release this will go into
  • [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 1, 2022

Thanks for taking the time to open a PR!

@marktnoonan marktnoonan marked this pull request as draft June 1, 2022 20:56
@cypress
Copy link

cypress bot commented Jun 1, 2022



Test summary

37553 0 454 0Flakiness 3


Run details

Project cypress
Status Passed
Commit 3509e87
Started Jun 1, 2022 10:06 PM
Ended Jun 1, 2022 10:22 PM
Duration 16:06 💡
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
e2e/origin/validation.cy.ts Flakiness
1 cy.origin > successes > uses cy.origin twice
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

@marktnoonan marktnoonan marked this pull request as ready for review June 1, 2022 21:10
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.

After visiting runs page, Runner styles are weird
3 participants