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 for accessory api controller #15533

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR mainly focuses on tests for the accessories API controller and includes some dead code removal in the process.

Type of change

  • Tests

Copy link

what-the-diff bot commented Sep 19, 2024

PR Summary

  • Removed Access Control for Accessory Creation and Checkout
    The team removed the authorization check for creating accessories in the system. In addition, the checkout process got simpler with removal of access control based on companies. This change should make the system more efficient and user-friendly.

  • Clean-up and Simplification
    Certain methods got simplified by removing unnecessary code. The checkin method under AccessoriesController for instance was overhauled to avoid improper handling of data and variables. Similarly, the logCheckin method in Loggable saw removal of unused codes related to settings retrieval. This would improve the performance of the software.

  • Multi-User Checkouts in Accessory Factory
    A new method for allowing checking out accessories to multiple users was added to AccessoryFactory. This will enhance the software's overall usability.

  • Additional Scripts for Functional Testing
    New test scripts were added like AccessoriesForSelectListTest and IndexAccessoryCheckoutsTest to verify and validate the software's ability to select accessories based on company and its retrieval capabilities. These tests will help ensure the software's accuracy and dependability.

  • Enhanced Testing for Accessory Management
    The team made enhancements to the test scripts pertaining to accessory management. These include changes to the existing index and update accessory tests to implement company scoping and allow successful accessory updates, and the addition of new store and checkin accessory tests for validating and storing accessories with required fields. This will make sure your software works in a reliable way and as expected, especially when managing accessories.

  • Further Testing Enhancements
    Additional tests were created to confirm the functionality of checking in accessories, the adherence to multi-company support scoping, and to verify the check-in logs. This should improve the software's robustness and reliability.

  • Improved Test Method Naming and Implementation
    Checkouts related test method was renamed for better clarity and the TestsPermissionsRequirement interface was applied for a consistent way of handling permissions. This should make the software more maintainable and easy to understand.

  • Added Functionality in Custom Test Macros
    A new feature was included in Custom Test Macros to check if response messages contain certain keys, providing a further layer of testing precision. This should improve the ability to quickly identify and fix any issues.

Copy link
Owner

@snipe snipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably make those tests pass 😂

@marcusmoore marcusmoore marked this pull request as draft September 19, 2024 20:50
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