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

Added tests around asset checkout #14755

Merged

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR adds tests around asset checkout via the web and API. It also includes a small test to ensure the LogListener handling a onCheckoutableCheckedOut event results in an entry in the action_logs table.

The only real change to application code, besides removing some extra whitespace, is in the AssetCheckoutRequest where the rules nullable and date were added for checkout_at and expected_checkin.

The test scenarios (methods in this case) between the two test cases are the same but the testLicenseSeatsAreAssignedToUserUponCheckout and testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled for the API is marked as incomplete since that behavior exists in the web but not in the API.

  • ❓ Should I update the API controller to match that behavior in this PR or in a follow up?

I'm opening this against develop but I'm totally fine with this being moved to draft until after v7.

Type of change

  • Tests

Copy link

what-the-diff bot commented May 23, 2024

PR Summary

  • Enhanced Validation for Checkout Dates
    The rules for validating checkout and expected check-in dates for assets have been improved. This is to ensure that the dates entered are valid and accurately represent the expected timelines for when these assets are being used.

  • New Method to Assign License Seats
    A new function has been introduced that allows a license seat to be assigned to an asset. This makes tracking usage and availability of licenses simpler and more efficient.

  • New Functionality to Confirm Deployability
    A new function called "readyToDeploy" has been introduced to check if certain assets are ready for deployment. This function helps teams to better manage their resources and to prevent any delays due to unavailability of resources.

  • Enhanced Testing Framework
    Several new test files have been added; AssetCheckoutTest under the Api/Assets and Feature/Checkouts sections, and LogListenerTest under the Unit/Listeners section. Additionally, many changes have been made to test methods in these files. These serve to provide a more robust testing framework for the application, resulting in more reliable software updates.

@snipe snipe merged commit 485caf1 into snipe:develop May 25, 2024
9 checks passed
@marcusmoore marcusmoore deleted the chore/sc-25103/add-tests-around-asset-checkout branch May 28, 2024 17:13
This pull request was closed.
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.

2 participants