Skip to content

Commit ba2db4d

Browse files
Fix tests with vitest for Vite
* Fix multiple Api calls Fixed the bug where multiple calls to the backend where made for no reason ## Key changes - Updated DataProvider - Added exposed component to interact with the one and only DataContext context. * Updated testing configuration Upgraded the testing configuration to be compatible with vitest new variables, and avoid problems in the future. ## Key changes - Updated gitignore to avoid constantly modifying package lock - Commiting for the last time package-lock changes - Added test parameters in app config to allow smooth testing - Added jsdom dependency to devDependencies -Added globals to frame config to allow testing, easier. * Context testing Added two more testing files to test the context, to make testing more robust. ## Key changes - Created DataContext.test.tsx - Created SearchContext.test.tsx * Testing working again Testing fixed after the migration from CRA to Vite. For this fix was necessary to strengthen the contexts and all the components that make contact with the Api <- Refactored these files. Added test script to package to allow npm to run the tests. ## Key changes - Fixes InventoryTablePageSelector.test.tsx, InventoryTable.test.tsx, NewProductButton.test.tsx, ProductForm.test.tsx. - Updated DataContext.test.tsx, SearchContext.test.tsx - Refactored for the new context management: - InventoryTable.tsx, - InventoryTableObj.tsx, - InventoryTablePageSelector.tsx - EncoraContent.tsx ## Breaking or pending changes - SearchBar component testing is still pending - Update documentation to the new version Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
1 parent 715e862 commit ba2db4d

20 files changed

+1632
-297
lines changed

inventory-manager/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
package-lock.json
1415

1516
# Editor directories and files
1617
.vscode/*

0 commit comments

Comments
 (0)