Add check for nullability for compliance framework

What does this MR do and why?

Add check for nullability for compliance framework

This change fixes a bug in the compliance framework dropdown component by adding optional chaining operators to prevent errors when accessing properties of potentially undefined objects. It also corrects two typos in method names, changing "fetchComplianceFramoworksByIds" to "fetchComplianceFrameworksByIds" in both the method definition and where it's called. Additionally, the update adds a new test case that verifies the component properly emits an error event when the query response doesn't include any frameworks, improving test coverage for error handling scenarios.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description UI
Error in stack trace Screenshot 2025-03-06 at 11.38.22.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #523627 (closed)

Edited by Artur Fedorov

Merge request reports

Loading