-
Notifications
You must be signed in to change notification settings - Fork 87
added triggers to check for and handle code conflicts in custom XMLs and updated relevant tests #1402
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
Conversation
bf84955
to
a1abd4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor comments.
src-electron/db/zap-schema.sql
Outdated
ON | ||
c.PACKAGE_REF = p.PACKAGE_ID | ||
INNER JOIN | ||
SESSION_PACKAGE spk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a big deal but cleanup formatting
src-electron/db/zap-schema.sql
Outdated
AND ( | ||
(c.CODE = c2.CODE AND c.MANUFACTURER_CODE = c2.MANUFACTURER_CODE) | ||
OR | ||
(c.CODE = c2.CODE AND c.MANUFACTURER_CODE IS NULL AND c2.MANUFACTURER_CODE IS NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(c.MANUFACTURER_CODE IS NULL OR c.MANUFACTURER_CODE = 0) AND (c2.MANUFACTURER_CODE IS NULL OR c2.MANUFACTURER_CODE=0) ?
p.PACKAGE_ID <> p2.PACKAGE_ID; | ||
END; | ||
|
||
/* Trigger that deals with code conflicts in attributes when a session package is re-enabled */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does re-enablement work for a user? how is the user flow in this case?
p.PACKAGE_ID <> p2.PACKAGE_ID; | ||
END; | ||
|
||
/* Trigger that deletes relevant code conflict session_notice entries when a session package is disabled */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are disabled and deleted separate for a user's flow with ZAP UI?
test/custom-matter-xml.test.js
Outdated
) | ||
expect( | ||
sessionNotif.some((notif) => | ||
notif.message.includes('Cluster code conflict') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these messages also check for the path you inserted to be more precise on the error?
a1abd4a
to
46940fa
Compare
- Added triggers to check for mfg code and code conflicts in custom xml. - When a session package (that is a manufacturer specific custom xml) is inserted or re-enabled these triggers check for the following: *If any other XMLs linked to the same session have cluster code conflicts *If any other XMLs extend the same cluster and have attribute or command code conflicts - and adds the relevant session notifications - Also added triggers to delete all code conflict session notifications related to a session package when that session package is deleted/disabled - Updated relevant tests to check for these session notifications ZAPP-1467
46940fa
to
d102bfa
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1402 +/- ##
==========================================
+ Coverage 66.00% 66.20% +0.19%
==========================================
Files 194 191 -3
Lines 20528 20674 +146
Branches 4455 4530 +75
==========================================
+ Hits 13550 13687 +137
- Misses 6978 6987 +9 ☔ View full report in Codecov by Sentry. |
ZAPP-1467