Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

add api verify

Open SimonCropp opened this issue 1 year ago • 2 comments
trafficstars

This adds snapshot testing to the repo using Verify

As an initial example i added a test for the API. This means any time the public API changes you need to accept that change. this secondary (in addition to the code that changes the api) acceptance serves as a confirmation of any change and the api change to be visualized in different way

to accept any change there are a variety of approaches https://github.com/VerifyTests/Verify?tab=readme-ov-file#snapshot-management

if u want to see the workflow for managing snapshots:

  • Initial Verification https://github.com/VerifyTests/Verify?tab=readme-ov-file#initial-verification
  • Subsequent Verification https://github.com/VerifyTests/Verify?tab=readme-ov-file#subsequent-verification

if u want to see some more content on how verify works https://github.com/VerifyTests/Verify?tab=readme-ov-file#media

let me know if u want to jump on a call to discuss any of the above

SimonCropp avatar Aug 16 '24 09:08 SimonCropp

Thank you for the submission.

If I'm not mistaken, this will only check if the public API should be allowed to be publisdhed. It will not check if the new API can be used?

For example, in https://github.com/Megabit/Blazorise/pull/5692, we never supported generic methods to be used as a validator on a non-generic delegate.

stsrki avatar Aug 16 '24 09:08 stsrki

Thanks @SimonCropp for creating the PR, it was on my to-do list so thanks!

@stsrki : this will indeed check every public API change you make, and you have to manually approve the api change for the unit test to succeed. This way you are made double aware of any changes you make and can verify it in a different context.

About the usability: that's something that can be covered by regular unit tests?

GeertvanHorrik avatar Aug 19 '24 19:08 GeertvanHorrik