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

🤖 Implement inventory validation in checkout process #701

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sentry-autofix[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated by Autofix 🤖

This fix was triggered by Danny Abou-Chakra

Fixes REACT-5FC

  • Added inventory check before completing checkout to prevent overselling.
  • Implemented enough_inventory? helper method in CheckoutController to validate inventory.
  • Added tests to verify checkout behavior with sufficient and insufficient inventory.
  • Improved error handling and reporting for inventory issues, including Sentry capture and user-friendly alerts.
  • Updated React component to handle inventory errors and display alerts to the user.

If you have any questions or feedback for the Sentry team about this fix, please email [email protected] with the Run ID: 6668.

Copy link

vercel bot commented Feb 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
empower ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 4:47pm

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 29.66%. Comparing base (63e4f96) to head (7b91ba4).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
react/src/components/Checkout.jsx 0.00% 15 Missing ⚠️

❌ Your project check has failed because the head coverage (29.66%) is below the target coverage (35.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
- Coverage   30.10%   29.66%   -0.45%     
==========================================
  Files          38       38              
  Lines         940      954      +14     
  Branches      113      119       +6     
==========================================
  Hits          283      283              
- Misses        640      654      +14     
  Partials       17       17              
Flag Coverage Δ
api 6.59% <ø> (ø)
frontend 45.89% <0.00%> (-1.18%) ⬇️
Components Coverage Δ
checkout_module 6.59% <ø> (ø)
product_component 41.49% <0.00%> (-1.81%) ⬇️
Files with missing lines Coverage Δ
react/src/components/Checkout.jsx 15.66% <0.00%> (-3.18%) ⬇️

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.

0 participants