Skip to content
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

Improve locate popup handling #2025

Merged

Conversation

antonbauhofer
Copy link
Member

@antonbauhofer antonbauhofer commented Sep 21, 2023

Summary of changes

  • Close popup when pressing apply and signals are located or no filter is set
  • Inform user when apply is pressed and no signals are located
  • Only change state when clicking on "apply" (not when clicking "clear")
  • Test that the message is shown

Fixes #2019

Context and reason for change

We are introducing a feature to "locate" resources that have or contain attributions with criteria that can be set in a new popup.

How can the changes be tested

Open OpossumUI, select "Locate Signals" in the edit context. In the popup, set the filters to search for a signal that does not exist, press "apply" and observe that the message is shown. Then, search for an existing signal, press "apply" and verify that the popup closes.

Note: Please review the guidelines for contributing to this repository.

@vasily-pozdnyakov vasily-pozdnyakov self-assigned this Sep 21, 2023
@@ -319,4 +319,34 @@ describe('locateResourcesByCriticalityAndLicense', () => {
expectedLocatedResources,
);
});

it('shows message when no filters are set, but no signals located', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filters are set?


const noSignalsAreFound =
locatedResources.size === 0 && resourcesWithLocatedChildren.size === 0;
const AllFiltersAreEmpty =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably should start with small a.

- Close popup when pressing apply and signals are located or no filter is set
- Inform user when apply is pressed and no signals are located
- Only change state when clicking on "apply" (not when clicking "clear")
- Test that the message is shown

Signed-off-by: Anton Bauhofer <anton.bauhofer@tngtech.com>
@antonbauhofer antonbauhofer force-pushed the improve-locator-popup-handling branch from 13ce759 to 9e6aee6 Compare September 21, 2023 13:16
@antonbauhofer antonbauhofer merged commit 942eaab into opossum-tool:main Sep 21, 2023
@antonbauhofer antonbauhofer deleted the improve-locator-popup-handling branch September 21, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1935] Adjustments in Locate popup behaviour
2 participants