Commit graph

295 commits

Author SHA1 Message Date
cfe63b2f92 modified: setup.py 2025-07-27 21:33:44 -04:00
1a66bd210e modified: make_post_sell/tests/test_functional.py 2025-07-27 21:32:45 -04:00
7e7ccd7581 Bump version to 1.0.7
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 21:08:54 -04:00
e29afe56fe Complete invoice coupon display testing for groupr regression
- 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>
2025-07-27 21:02:21 -04:00
698b44e9e6 Expand groupr regression test to verify invoice coupon display
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>
2025-07-27 20:33:00 -04:00
76c171df18 Add discount/coupon breakdown to invoice template
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>
2025-07-27 20:28:11 -04:00
267db2e278 Remove transaction management workarounds from tests
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>
2025-07-27 19:56:32 -04:00
b9669c1f6a Bump version to 1.0.6
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 19:51:31 -04:00
0c6516d3f9 Fix NoTransaction error in cart checkout completion
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>
2025-07-27 19:50:53 -04:00
0697eacb89 Fix database transaction management in download permissions test
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>
2025-07-27 18:57:09 -04:00
8182a53465 Remove is_ready mock from basic download permissions test
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>
2025-07-27 18:53:21 -04:00
7ef0a05fd3 Extend groupr regression test to include download functionality and bump to v1.0.5
- 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>
2025-07-27 18:51:07 -04:00
34bca832bb Add RST table of contents directive to journal 2025-07-27 17:23:00 -04:00
ba58135981 Bump version to 1.0.4 2025-07-27 17:16:09 -04:00
de868682a8 Fix cart discount memoization bug and template null safety
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.
2025-07-27 17:09:59 -04:00
3f692aabbd Add regression test for stripe_user_shop None AttributeError
- 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>
2025-07-27 16:01:45 -04:00
95f2957106 Fix NoneType error in cart checkout
- 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>
2025-07-27 15:50:38 -04:00
b67521936e Fix Python 2/3 compatibility issue in base64 decoding
- 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>
2025-07-27 15:40:04 -04:00
8672802e78 Fix GitLab CI pypi-twine stage for Python 3.12+ externally-managed-environment
- 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
2025-07-27 13:58:57 -04:00
c1fda9a356 Update setup.py version 1.0.3 has 100% test coverage in the cart model. 2025-07-27 17:55:03 +00:00
9f2033d7c4 Merge branch 'cart-code-coverage-100-percent' into 'master'
Achieve 100% test coverage for Cart model

See merge request engineering/make-post-sell/make_post_sell!44
2025-07-27 17:53:05 +00:00
89f8737a58 Achieve 100% test coverage for Cart model 2025-07-27 17:53:05 +00:00
66455dc45a Merge branch 'remarkbox' into 'master'
Add comment & review system for products & content

See merge request engineering/make-post-sell/make_post_sell!43
2025-06-24 13:44:08 +00:00
c15d5e2425 Add comment & review system for products & content 2025-06-24 13:44:08 +00:00
6e0bad873a Implement visibility-aware S3 ACL controls for product security
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
2025-06-24 01:25:51 -04:00
afa08780bf modified: README.rst 2025-06-02 16:14:20 -04:00
2ddb679dc8 modified: development.ini 2025-06-02 07:07:55 -04:00
09b4a728b4 if a browser has a deleted cart, create a new one.
modified:   make_post_sell/request_methods.py
2025-05-31 09:45:11 -04:00
dffeb15775 fix regressions with the cart
modified:   make_post_sell/templates/cart.j2
2025-05-29 21:24:18 -04:00
317fa68bae Update journal.rst 2025-05-29 14:53:07 +00:00
07b020a927 Merge branch 'http-verb-get-to-post-csrf' into 'master'
http-verbs-get-to-post-csrf

See merge request engineering/make-post-sell/make_post_sell!42
2025-05-07 10:55:51 +00:00
07722bb962 http-verbs-get-to-post-csrf 2025-05-07 10:55:51 +00:00
590d13d77b Merge branch 'auto-refresh-content-and-product-pages' into 'master'
refresh page via web 1.5 js to refresh signed URIs

See merge request engineering/make-post-sell/make_post_sell!41
2025-04-30 14:43:09 +00:00
06d35dbb86 refresh page via web 1.5 js to refresh signed URIs 2025-04-30 14:43:08 +00:00
d048c7410a Update .gitlab-ci.yml 2025-04-05 14:13:42 +00:00
373ff9d09e Merge branch 'auto-refresh-content-and-product-pages' into 'master'
refresh page via web 1.5 js to refresh signed URIs

See merge request engineering/make-post-sell/make_post_sell!40
2025-03-08 19:30:51 +00:00
e440a3c3ef refresh page via web 1.5 js to refresh signed URIs 2025-03-08 19:30:51 +00:00
1162034875 @echo "Deleting tests from source code for production..."
rm -rf make_post_sell/tests

	modified:   Makefile
2025-03-03 17:14:36 -05:00
fac977b7b7 prune tests...
modified:   MANIFEST.in
2025-03-03 17:07:01 -05:00
95de8baf86 modified: setup.py 2025-03-03 16:58:05 -05:00
86d77f3451 Update .gitlab-ci.deploy.yml 2025-03-03 20:40:53 +00:00
87738b964e new file: .gitlab-ci.deploy.yml
modified:   .gitlab-ci.yml
2025-03-03 15:30:16 -05:00
92de9cf678 modified: .gitlab-ci.yml 2025-03-03 15:23:58 -05:00
457a075c29 modified: .gitlab-ci.yml 2025-03-03 15:17:34 -05:00
1807dc882b modified: .gitlab-ci.yml 2025-03-03 11:43:37 -05:00
2746258ddb early optimization is the death by 1,000 cuts.
modified:   .gitlab-ci.yml
	modified:   Makefile
2025-03-03 10:53:17 -05:00
08bb45691f Update .gitlab-ci.yml 2025-03-03 15:22:50 +00:00
2439363296 Update .gitlab-ci.yml file 2025-03-03 15:18:57 +00:00
8555afa25b Update .gitlab-ci.yml 2025-03-03 14:56:55 +00:00
563b92fd37 Update .gitlab-ci.yml file fix builds 2025-03-03 13:08:51 +00:00