Skip to content

MudCheckBox: Add state CSS classes for easier testing#8699

Merged
ScarletKuro merged 3 commits intoMudBlazor:devfrom
henon:checkbox-state-classes
Apr 15, 2024
Merged

MudCheckBox: Add state CSS classes for easier testing#8699
ScarletKuro merged 3 commits intoMudBlazor:devfrom
henon:checkbox-state-classes

Conversation

@henon
Copy link
Contributor

@henon henon commented Apr 15, 2024

Description

Testing with checkboxes is a pain. I want to add this to mudcheckbox

                .AddClass($"mud-checkbox-true", BoolValue == true)
                .AddClass($"mud-checkbox-false", BoolValue == false)
                .AddClass($"mud-checkbox-null", BoolValue is null)

otherwise I'd have to compare icon geometry
I did it before but it is far from ideal
the classes have no CSS. but could be used by the user as a selector as well

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library PR: needs review labels Apr 15, 2024
@codecov
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.03%. Comparing base (28bc599) to head (1ddfc56).
Report is 49 commits behind head on dev.

❗ Current head 1ddfc56 differs from pull request most recent head ef4ce11. Consider uploading reports for the commit ef4ce11 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8699      +/-   ##
==========================================
+ Coverage   89.82%   90.03%   +0.20%     
==========================================
  Files         412      418       +6     
  Lines       11878    12021     +143     
  Branches     2364     2366       +2     
==========================================
+ Hits        10670    10823     +153     
+ Misses        681      662      -19     
- Partials      527      536       +9     

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

@ScarletKuro ScarletKuro merged commit b5d893b into MudBlazor:dev Apr 15, 2024
@henon henon deleted the checkbox-state-classes branch April 15, 2024 08:53
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants