process-analytics / bpmn-visualization-addons

Add-ons for `bpmn-visualization`.
https://process-analytics.github.io/bpmn-visualization-addons/
Apache License 2.0
3 stars 0 forks source link

feat: improve the robustness of `PathResolver` #119

Closed tbouffard closed 1 year ago

tbouffard commented 1 year ago

Add several unit tests and simplify the implementation.

closes #18

### Tasks
- [x] Check if we need the code that currently check that edges really exist in the model
- [x] Refactor the implementation if possible
- [x] Add link to the bpmn-visualization issue in tests to explain why extra erroneous edge ids are returned (the test will break once `bv-experimental-add-ons` uses the new release)

Notes

Current limitation

The current implementation doesn't filter out erroneous edge identifiers that are resolved from incorrectly defined incoming and outgoing identifiers. bpmn-visualization doesn't filter them out itself when it should, so I decided not to do it here but to create an issue in the bpmn-visualization repository instead: https://github.com/process-analytics/bpmn-visualization-js/issues/2852

Note that the old implementation didn't filter out these erroneous edge identifiers either, so there's no reason to keep it instead of switching to the new implementation.

All code is now fully covered by tests 🎉

=============================== Coverage summary ===============================
Statements   : 100% ( 63/63 )
Branches     : 100% ( 26/26 )
Functions    : 100% ( 19/19 )
Lines        : 100% ( 62/62 )
================================================================================
github-actions[bot] commented 1 year ago

:recycle: PR Preview 36595e0fb1098cfa69e99a08ca09403168d33982 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication