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

Stub / spy counter badge is cut off #4822

Closed
bahmutov opened this issue Jul 25, 2019 · 4 comments · Fixed by #4910
Closed

Stub / spy counter badge is cut off #4822

bahmutov opened this issue Jul 25, 2019 · 4 comments · Fixed by #4910
Labels
good first issue Good for newcomers pkg/reporter This is due to an issue in the packages/reporter directory

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Jul 25, 2019

Cypress 3.4.0 with Electron or Chrome

Recipe in https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/stubbing-spying__window

Run the spec file and after it is finished click on the button "Open new window" inside the application frame (like a user). The cy.stub counter keeps incrementing - and the badge appears, but the badge gets cut off on the left.

Screen Shot 2019-07-25 at 9 25 51 AM

Screen Shot 2019-07-25 at 9 26 23 AM

Relevant markup

Screen Shot 2019-07-25 at 9 29 42 AM

Relevant files:

  • packages/reporter/src/commands/command.jsx
  • packages/reporter/src/commands/commands.scss
@bahmutov bahmutov added difficulty: 1️⃣ good first issue Good for newcomers pkg/reporter This is due to an issue in the packages/reporter directory labels Jul 25, 2019
@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Jul 26, 2019
@hhudson
Copy link
Contributor

hhudson commented Jul 31, 2019

Hello @bahmutov - I think I know how to address this. It would seem that the counter is not so much being 'cut off' as the border-radius css hasn't been defined to create a symmetrical pill shape around the counter.

Specifically, I would propose changing the css to

.num-duplicates.has-alias {
      border-radius: 10px 10px 10px 10px;
      line-height: 2;
      padding: 3px 5px 3px 5px;
    }

I believe this change would give the desired 'not cut-off look' you are seeking. Would you like me to contribute this change?

@jennifer-shehane
Copy link
Member

hhudson added a commit to hhudson/cypress that referenced this issue Aug 2, 2019
Proposal to eliminate the 'cut-off' appearance of the counter in favor of more of a 'pillbox' look
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope labels Sep 29, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 29, 2019

The code for this is done in cypress-io/cypress#4910, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

brian-mann pushed a commit that referenced this issue Sep 29, 2019
* #4822

Proposal to eliminate the 'cut-off' appearance of the counter in favor of more of a 'pillbox' look

* Simplify 10px CSS
@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Sep 29, 2019
grabartley pushed a commit to grabartley/cypress that referenced this issue Oct 6, 2019
* cypress-io#4822

Proposal to eliminate the 'cut-off' appearance of the counter in favor of more of a 'pillbox' look

* Simplify 10px CSS
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers pkg/reporter This is due to an issue in the packages/reporter directory
Projects
None yet
3 participants