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

Fixed consumable checkout via API not sending notification #14190

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR fixes a bug where checkout notifications are not sent to users when a consumable is checked out via the API. Like in #14181, I added tests for the web and API controller methods but really only the api test for testUserSentNotificationUponCheckout() fails without the change in the controller (firing the CheckoutableCheckedOut event).

This PR follows up on #14181 and fixes #13782

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Copy link

Copy link

what-the-diff bot commented Jan 30, 2024

PR Summary

  • Introduction of Event to ConsumablesController
    Updated ConsumablesController with the ability to handle CheckoutableCheckedOut events.

  • Addition of New Fabrication Methods
    The 'ConsumableFactory' has two newly added methods named withoutItemsRemaining() and requiringAcceptance(), enhancing how consumables are fabricated in our code.

  • Implementation of Consumable Checkout Tests
    A new test suite ConsumableCheckoutTest is introduced to check the basic checkout process of a consumable. It independently verifies each step such as the validation process in checkout, consumable availability at checkout, along with the creation of an action log and notification dispatch.

  • Refactoring of Accessory Checkout Validation Test
    Improved the readability of our test suites by renaming the test case from testValidation() to testValidationWhenCheckingOutAccessory() in AccessoryCheckoutTest.

  • Addition of Missing Components in Test Suites
    Updated test files tests/Feature/Api/Consumables/ConsumableCheckoutTest and tests/Feature/Checkouts/AccessoryCheckoutTest, each with a missing line to create a new consumable before the test runs. This ensures our test suites are self-contained and do not depend on external entities.

@marcusmoore
Copy link
Collaborator Author

@snipe friendly ping for a review 😄

@snipe snipe merged commit 1a48043 into snipe:develop Feb 5, 2024
8 checks passed
@marcusmoore marcusmoore deleted the bug/sc-24685 branch February 5, 2024 18:33
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.

None yet

2 participants