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

E2E tests: update cache control headers tests. #4785

Closed
wants to merge 1 commit into from

Conversation

joemcgill
Copy link
Member

This adjusts the "No private directive present in cache control when user not logged in" test so they won't fail if the headers don't contain a cache-control key at all.

While trying to debug why E2E tests have been flaky, I noticed that the logged out test for cache control headers was often failing locally because the response headers don't have a cache-control key at all, resulting in a Matcher error: received value must not be null nor undefined failure. This adjusts the tests to use expect.not.objectContaining() instead.

Trac ticket: https://core.trac.wordpress.org/ticket/21938


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

This adjusts the "No private directive present in cache control when user not logged in" test so they won't fail if the headers don't contain a `cache-control` key at all.
@joemcgill joemcgill marked this pull request as ready for review July 4, 2023 02:32
@johnbillion
Copy link
Member

The tests are running fine for me locally with this change, but CI still isn't happy. I'll get this in anyway.

@johnbillion
Copy link
Member

@johnbillion johnbillion closed this Jul 4, 2023
@joemcgill
Copy link
Member Author

Thanks @johnbillion. Agree with you that this doesn't fix the timeouts that we're seeing in CI, but this does make it easier to run these tests locally while debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants