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: properly test untyped selectable box sets #2736

Conversation

brian-smith-tcril
Copy link
Contributor

Description

Every PR post #2581 is showing

image

It seems a test was added that was setting an invalid type on SelectableBoxSet and eating the error to make the test pass.

Before #2581, there were comments explaining this and eslint-disables.

// Mock the `console.error` is intentional because an invalid `type` prop
// with type `text` specified for `ForwardRef` expects one of the ['radio','checkbox'] parameters.
// eslint-disable-next-line no-console

I decided, instead of bringing back the eslint-disables, to

  • Pass no type into the component instead of an invalid type
    • I believe this properly tests if it "renders with radio type if neither checkbox nor radio is passed"
  • Remove the console error eating

Merge Checklist

  • Is there adequate test coverage for your changes?

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@netlify
Copy link

netlify bot commented Oct 19, 2023

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f5e837c
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/6532a069b25e310008997535
😎 Deploy Preview https://deploy-preview-2736--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bb7d388) 92.82% compared to head (f5e837c) 92.82%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2736   +/-   ##
=======================================
  Coverage   92.82%   92.82%           
=======================================
  Files         235      235           
  Lines        4237     4237           
  Branches     1029     1029           
=======================================
  Hits         3933     3933           
  Misses        300      300           
  Partials        4        4           

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

Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

LGTM. Good catch, thanks! :shipit:

@brian-smith-tcril brian-smith-tcril merged commit 63d4640 into openedx:master Oct 20, 2023
10 checks passed
@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 21.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 22.0.0-alpha.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants