You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
` is being ${added ? 'enabled' : 'disabled'}, but it has descriptive conformance and requires manual validation from the feature specification to enable/disable the right dependencies in ZAP.`
202
+
result.displayWarning=true
203
+
}
206
204
207
205
// generate patterns for outdated feature warnings to be deleted
Copy file name to clipboardExpand all lines: test/feature.test.js
+50Lines changed: 50 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -767,6 +767,56 @@ test(
767
767
testUtil.timeout.short()
768
768
)
769
769
770
+
test(
771
+
'Check feature with desc conformance allows toggling but shows warning',
772
+
()=>{
773
+
// Test enabling a feature with 'desc' conformance
774
+
letelements={
775
+
attributes: [],
776
+
commands: [],
777
+
events: []
778
+
}
779
+
letfeatureMap={
780
+
DESCFEATURE: false
781
+
}
782
+
letfeatureWithDesc={
783
+
cluster: 'Test Cluster',
784
+
name: 'Feature With Desc',
785
+
code: 'DESCFEATURE',
786
+
conformance: 'desc',
787
+
deviceTypes: ['Test Device Type'],
788
+
bit: 0
789
+
}
790
+
letclusterFeatures=[featureWithDesc]
791
+
letendpointId=1
792
+
793
+
// Enable the feature with 'desc' conformance
794
+
featureMap['DESCFEATURE']=true
795
+
letresult=conformChecker.checkElementConformance(
796
+
elements,
797
+
featureMap,
798
+
featureWithDesc,
799
+
endpointId,
800
+
clusterFeatures
801
+
)
802
+
803
+
// Should allow toggling (disableChange is false) but show warning
804
+
letwarningPrefix=env.formatEmojiMessage(
805
+
'⚠️',
806
+
`Check Feature Compliance on endpoint: ${endpointId}, cluster: ${featureWithDesc.cluster}, `+
807
+
`feature: ${featureWithDesc.name} (${featureWithDesc.code}) (bit ${featureWithDesc.bit} in featureMap attribute)`
808
+
)
809
+
letexpectedWarning=
810
+
warningPrefix+
811
+
` is being enabled, but it has descriptive conformance and requires manual validation from the feature specification to enable/disable the right dependencies in ZAP.`
0 commit comments