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

test(browser): Avoid making requests to http://example.com #15059

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 17, 2025

The http version of example.com seems to have become unstable, even for the preflight CORS requests the browser makes.
This PR adds a couple of page.route proxies to ensure we don't actually send requests to example.com.

Also, I found a test which previously wasn't failing when the assertions didn't pass

});

await getLocalTestUrl({ testDir: __dirname });
const requestPromise = page.waitForRequest('http://example.com/api/test/');
Copy link
Member Author

Choose a reason for hiding this comment

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

this test was previously missing a page.goto call, causing the assertions to not even be executed. Cleaned up the test to ensure that we now actually assert on the headers (and fail if they don't match)

@Lms24 Lms24 requested review from a team, stephanie-anderson, chargome and AbhiPrasad and removed request for a team and stephanie-anderson January 17, 2025 16:16
@Lms24 Lms24 merged commit 516f632 into develop Jan 17, 2025
50 checks passed
@Lms24 Lms24 deleted the lms/test-browser-examplecom-route branch January 17, 2025 17:04
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