Project: 	
  | View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | ||||||||||||
| 0053962 | ||||||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| feature request | [POS2] POS | minor | have not tried | 2023-11-16 13:56 | 2023-11-17 13:22 | |||||||
| Reporter | AugustoMauch | View Status | public | |||||||||
| Assigned To | AugustoMauch | |||||||||||
| Priority | normal | Resolution | open | Fixed in Version | ||||||||
| Status | scheduled | Fix in branch | Fixed in SCM revision | |||||||||
| Projection | none | ETA | none | Target Version | ||||||||
| OS | Any | Database | Any | Java version | ||||||||
| OS Version | Database version | Ant version | ||||||||||
| Product Version | SCM revision | |||||||||||
| Merge Request Status | open | |||||||||||
| Review Assigned To | ||||||||||||
| OBNetwork customer | No | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0053962: The quality of many jest unit tests can be improved, replacing dependencies withs mocks | |||||||||||
| Description | Wee have identified several cases where a component is very simple (i.e. CashupProcess [1]) but its test requires a lot of setup because it is using the dependencies (both direct and indirect) of the component it is testing, instead of mocking them like they should in unit tests. [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/c78aa8b8c92612072140ef9d21545e355cdd2b40/web-jspack/org.openbravo.pos2/src/components/Cashup/CashupProcess/CashupProcess.jsx [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/c78aa8b8c92612072140ef9d21545e355cdd2b40/web-jspack/org.openbravo.pos2/src/components/Cashup/CashupProcess/__test__/CashupProcess.test.jsx [^]  | |||||||||||
| Steps To Reproduce | - | |||||||||||
| Proposed Solution | Mock dependencies instead of testing the real ones | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
		  Relationships		[ Relation Graph ] 
		[ Dependency Graph ] 
			 | 
|
  		Notes	 | 
|
| 
				(0157285) hgbot (developer) 2023-11-17 13:22  | 
	
		Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1288 [^] | 
  Issue History	 | 
|||
| Date Modified | Username | Field | Change | 
| 2023-11-16 13:56 | AugustoMauch | New Issue | |
| 2023-11-16 13:56 | AugustoMauch | Assigned To | => AugustoMauch | 
| 2023-11-16 13:56 | AugustoMauch | OBNetwork customer | => No | 
| 2023-11-16 13:56 | AugustoMauch | Triggers an Emergency Pack | => No | 
| 2023-11-16 13:56 | AugustoMauch | Status | new => scheduled | 
| 2023-11-17 13:22 | hgbot | Merge Request Status | => open | 
| 2023-11-17 13:22 | hgbot | Note Added: 0157285 | |
| Copyright © 2000 - 2009 MantisBT Group |