- Expand groupr regression test to validate full end-to-end invoice display
- Add proper Stripe key configuration through settings form workflow
- Handle complex transaction management and session state after commits
- Test now produces valid invoice showing coupon discounts for groupr scenario
- Validates both AttributeError fix and invoice template enhancements
- Gracefully handles session/ownership edge cases in checkout completion
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extended the free coupon checkout test to also verify that:
- Checkout completion creates an invoice with coupon redemptions
- Invoice page displays discount breakdown with coupon information
- Coupon codes and descriptions appear on invoice
- Discount amounts are calculated correctly
This ensures the invoice discount display enhancement works end-to-end.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive pricing breakdown to invoice display showing:
- Subtotal before discounts
- Applied coupon codes and descriptions
- Total discount amount
- Handling costs
- Final total
Critical for ecommerce transparency - both customers and shop owners
can now see what discounts were applied to each invoice.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove manual transaction.manager.commit/begin calls that were masking
the real transaction management issues in cart_complete_checkout.
Keep only minimal session re-querying needed for test object attachment.
Now that root cause is fixed, tests can run without transaction workarounds.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove manual transaction management (tm.begin/commit) that was conflicting
with pyramid_tm's automatic transaction handling. Keep tm.abort() calls
for proper rollback on payment failures.
Fixes production issue affecting users like groupr and bluediamon during
free cart checkout completion.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Properly handle database state by committing current transaction and
re-querying objects before web interface testing. This fixes database
locking issues while preserving full HTML verification of download button
absence when product has no file.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The test_product_download_permissions_basic should test real unmocked
behavior to verify download button doesn't appear when no file exists.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add download permissions testing to free coupon checkout regression test
- Create separate basic download permissions test with HTML assertions
- Fix database state management by removing manual user deletion in tearDown
- Update version from 1.0.4 to 1.0.5 for new release
- Validate all three download scenarios:
1. Download permissions work correctly (both tests)
2. Download button appears when file exists (mocked is_ready)
3. Download button absent when no file (unmocked behavior)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Resolves critical AttributeError in free cart checkout when coupons are applied.
- Fix cart discount calculation cache invalidation in coupon.py
- Add template null safety for active_card in cart_checkout.j2
- Add comprehensive regression test for free cart coupon flow
- Document full defect hunt process in journal.rst
All 87 tests pass. Fixes production crashes during free cart checkout.
- Add test_cart_checkout_logic_with_none_stripe_user_shop to prevent regression
- Tests the exact scenario that caused production AttributeError
- Validates both old buggy code would crash and new fixed code works
- Covers edge case where stripe_user_shop is None in cart checkout
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add null check for stripe_user_shop before accessing active_card property
- Prevents AttributeError: 'NoneType' object has no attribute 'active_card'
- Handle case where stripe_user_shop is None in cart checkout flow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace deprecated .decode("base64") with base64.b64decode() in short_id_to_bytes function
- Add import base64 to meta.py
- Add comprehensive unit tests for short_id_to_bytes and id_to_uuid functions
- Prevents AttributeError: 'str' object has no attribute 'decode' errors
- Resolves bad gateway authentication issues when accessing URLs with short IDs
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create virtual environment for twine operations instead of system-wide installs
- Use python3 -m build instead of deprecated setup.py commands
- Resolves PEP 668 externally-managed-environment restrictions in CI
This update enhances product file security by automatically managing S3 object ACLs based on product visibility settings:
- Added get_s3_acl_for_file_key() method to determine appropriate ACL per file type and visibility
- Added update_s3_acls() method to batch update all product file permissions
- Added set_visibility() method that updates visibility and synchronizes S3 ACLs
- Updated product edit view to use new ACL-aware visibility setting
- Added comprehensive unit tests covering all visibility scenarios
- Created migration script to fix existing product S3 ACLs
Security model:
- Private products: All files (product, preview, thumbnails) are private
- Public/unlisted products: Product files remain private, public files (previews/thumbnails) are public-read
- All product downloads continue to use presigned URLs for access control