RedHatInsights / tower-analytics-frontend

Automation Analytics provides data analytics for Ansible Tower that provides visualization and insight into how automation is used in your organization.
https://console.redhat.com/ansible/ansible-dashboard
Apache License 2.0
9 stars 28 forks source link

Filter: clicking clear all filters when using default filters breaks filters #1053

Closed himdel closed 3 weeks ago

himdel commented 3 weeks ago

Before: Go to any screen with filters .. filters work; click clear all filters, twice (or once with default filters); filters don't work. Now: filters keep working after resetting filters regardless

Looks like the problem was that when namespace == DEFAULT_NAMESPACE (which is the default state), resetting it to newQueryParams would never happen, because right after that it would be overwritten by {} thanks to removeDefault. IIUC removeDefault should remove the default completely only when not replacing it with a new default, and it seems to work :)

cypress[bot] commented 3 weeks ago

tower-analytics-frontend    Run #1984

Run Properties:  status check errored Errored #1984  •  git commit c8cc31be91: Clear all filters - don't overwrite new settings with {} when in default namespa...
Project tower-analytics-frontend
Branch Review pr-1053
Run status status check errored Errored #1984
Run duration 00m 47s
Commit git commit c8cc31be91: Clear all filters - don't overwrite new settings with {} when in default namespa...
Committer Martin Hradil
View all properties for this run ↗︎

Test results
Tests that failed  Failures 22
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 0
View all changes introduced in this branch ↗︎