Skip to content

Conversation

alannadolny
Copy link
Collaborator

@alannadolny alannadolny commented Sep 5, 2025

The main idea of this improvement is to simplify adding new products and inventories. Current solution doesn't require adding new data in env, app config, etc. To create a new product or inventory, it is needed to fulfill the CSV that can be found in src/setup/dataImport. The data is loaded on every setup before running tests. If there will be a need to remove inventories or import other products while running specific tests, it is needed to create a new CSV file (for inventories with 0 qty, if removing) and call the endpoint that is called during setup. ID of every product that was created can be found in .data.json, so it's accessible by product code using helper methods that were created previously. Product data is also accessible from the AppConfig, but to get the specific that, there is a need to pass the product code. At this moment, productService is exactly the same service for every product. To change the product on which all of the operations will be executed, you should call setProduct and pass the product code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant