rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
463 stars 261 forks source link

Add data driven unit test for NamespaceFilter component #7500

Open cnotv opened 2 years ago

cnotv commented 2 years ago

Description

Add tests based on mocked data from the server to populate the options and display component without errors.

Context

Since ignoring returned specific data from the state in the tests for https://github.com/rancher/dashboard/issues/7391 has led us to an issue (https://github.com/rancher/dashboard/issues/7495) while adjusting the code. For the specific case, we should ensure that the component is displayed in case of no preferences object or selection, similarly to the existing test setup, but display a fallback as in no selection.

gaktive commented 1 year ago

E2E would be prioritized first before we do this.