Closed tuckerzp closed 1 year ago
I wanted to document what has been done as I am a bit stuck on what to try to fix the tests from here.
click()
failing on cypress tests
The point of failure happens after the drawer selector is done loading and Catalogs
should be clickable. All other document types work. Usually catalogs are finicky because they are so large, but this does not seem to be the case as the fetch is successful before attempting to click.
Manually clicking causes tests to pass
When running the tests locally, you are able to click on the tree item (before the tests attempt to click) and things pass.
Waiting does not fix tests
Adding a cypress.wait()
after the drawer is done fetching and before you click also does not fix anything.
Doing click()
twice makes Catalog tests pass
Although all other tests fail...
Reverting to before React 18 update does not fix issue
Navigation Failing
For some reason the first click when selecting catalogs in the drawer selector fails. This leads to A LOT of tests failing as we use this function in pretty much all our tests.
This temporary fix will let us test other functionality rather than just always failing. We really should completely rework how we navigate to each document type in the future as this code is extremely fragile.
Loading Invalid Components Failing
When we intentionally put in invalid data, a
TypeError
is thrown. We are still able to reload new data after that failure, so we catch the exception. This test may be want to reconsidered when https://github.com/EasyDynamics/oscal-react-library/issues/872 or subsequent related issues are completed.