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

fix: tests failed to open catalog list #261

Merged
merged 6 commits into from
May 26, 2023

Conversation

tuckerzp
Copy link
Contributor

@tuckerzp tuckerzp commented May 17, 2023

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 EasyDynamics/oscal-react-library#872 or subsequent related issues are completed.

@tuckerzp tuckerzp force-pushed the tuckerzp/click-catalog-in-tests branch from 730cbae to 2d22655 Compare May 17, 2023 18:40
@tuckerzp
Copy link
Contributor Author

I wanted to document what has been done as I am a bit stuck on what to try to fix the tests from here.

What has been done so far:

  • 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

tuckerzp added 2 commits May 19, 2023 13:46
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 naviagte to each
document type in the future as this code is extemely fragile.
@tuckerzp tuckerzp changed the title fix: Tests failed to open Catalog list fix: tests failed to open catalog list May 25, 2023
@tuckerzp tuckerzp requested review from laurelmay and Bronstrom May 26, 2023 16:50
@tuckerzp tuckerzp marked this pull request as ready for review May 26, 2023 16:50
Copy link
Contributor

@laurelmay laurelmay left a comment

Choose a reason for hiding this comment

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

This may not be ideal but I am going to ahead and say that it's probably best to get our tests back to passing. We plan to do more significant work around document loading soon so I think this is fine.

@laurelmay laurelmay merged commit 591a4e7 into main May 26, 2023
@laurelmay laurelmay deleted the tuckerzp/click-catalog-in-tests branch May 26, 2023 18:31
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.

2 participants