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

chore(ui): test that UI works behind proxy #33767

Closed
wants to merge 3 commits into from

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Nov 26, 2024

This PR adds a test to ensure we support running UI behind a proxy. It adds the http-proxy library to test this. As discussed, we need that for websocket support. I'll try replacing the existing proxy library with that in a separate PR.

Closes #33705.

@Skn0tt Skn0tt self-assigned this Nov 26, 2024
Copy link
Member

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

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

Lets try to replace it first to see if its feasible?

@@ -16,6 +16,9 @@

import { createImage } from './playwright-test-fixtures';
import { test, expect, retries } from './ui-mode-fixtures';
import http from 'node:http';
import httpProxy from 'http-proxy';
import { ManualPromise } from 'packages/playwright-core/lib/utils/manualPromise';
Copy link
Member

Choose a reason for hiding this comment

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

We usually use relative imports I think, packages/playwright works by accident here I think.

Copy link
Member Author

@Skn0tt Skn0tt Nov 26, 2024

Choose a reason for hiding this comment

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

this was a remnant, didn't even use it 😅

This comment has been minimized.

Copy link
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › ui-mode-trace.spec.ts:345:5 › should work behind proxy @windows-latest-node18-1

37178 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

@Skn0tt
Copy link
Member Author

Skn0tt commented Nov 26, 2024

We discussed offline that we'd prefer not to have two proxy libraries within the project. But since http-proxy doesn't support CONNECT-style proxying and seems unmaintained, we can't use it as a replacement for proxy.

This PR is superceded by #33771, which instead extends proxy with WebSocket support.

@Skn0tt Skn0tt closed this Nov 26, 2024
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.

[Bug]: UI Mode with subpath proxying does not report traces during test
2 participants