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

Ensure non-bot values are printed if value is zero #549

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Jan 2, 2025

Do an explicit undefined check for nonBots when evaluating if the bots or non-bots visits should be displayed in overview visits cards, to make sure the value is displayed when it's zero.

[true, 0, () => {
expect(screen.getByText('0')).toBeInTheDocument();
expect(screen.queryByText('50')).not.toBeInTheDocument();
}],
Copy link
Member Author

Choose a reason for hiding this comment

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

This test fails with previous logic

@acelaya acelaya merged commit 7e37464 into shlinkio:main Jan 2, 2025
4 of 6 checks passed
@acelaya acelaya deleted the feature/zero-non-bots branch January 2, 2025 15:32
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.35%. Comparing base (226feb4) to head (f2f7899).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
src/overview/helpers/VisitsHighlightCard.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #549      +/-   ##
==========================================
- Coverage   77.36%   77.35%   -0.02%     
==========================================
  Files         177      177              
  Lines        7247     7247              
  Branches     1505     1504       -1     
==========================================
- Hits         5607     5606       -1     
  Misses        162      162              
- Partials     1478     1479       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant