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

Accessibility Cypress Test Unexpectedly Failing #693

Closed
noschiff opened this issue May 5, 2022 · 0 comments · Fixed by #697
Closed

Accessibility Cypress Test Unexpectedly Failing #693

noschiff opened this issue May 5, 2022 · 0 comments · Fixed by #697
Labels
bug Something isn't working

Comments

@noschiff
Copy link
Member

noschiff commented May 5, 2022

Occasionally, the CI Check / frontend-tests fails because accessibility-spec.ts fails. For example a minor commit that changed a minor front-end component caused the following error. The previous commit passed all checks, and the new commit did not change anything related to the failing Cypress test. The GitHub action for this check is here.

AssertionError: Timed out retrying after 4000ms: Expected to find element: [data-cyId=requirements-showCompleted], but never found it.

After reviewing the video of the failed test, I believe that the assertion error results from the Cypress testing account not having any courses in its schedule. Other Cypress tests add courses to the schedule, so I assume that when those tests are run before the accessibility test, the accessibility test doesn't fail. I don't know how to determine the order in which tests are run, and I don't know when the Cypress account's semester data is reset.

This failure should happen more often if it's really caused by the tests being run in the wrong order. However, I reran the front-end test for a similar commit that unexpectedly failed for the same reason, and it passed the second time it was run. This is evidence that randomness is probably a factor! Run 1. Run 2. This is an issue that needs to be addressed, because a check should produce the same result every time it is run on the same commit.

@willespencer:

There is no course in the plan so nothing shows in completed, which is why Cypress can't find that element to interact with.
I think we should add a course as part of this singular unit test so it doesn't rely on other ones.

A similar accessibility error occurred on beta-release after the release was merged in. This is problematic because a PR that passes all its checks before merging should also pass its checks after it's merged in. I don't think that that is related to this specific issue, but we still need to figure out why checks fail after passing previously. I think that check might have an issue with the release adding seasons.

@noschiff noschiff added the bug Something isn't working label May 5, 2022
@willespencer willespencer linked a pull request Jun 6, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant