-
Notifications
You must be signed in to change notification settings - Fork 246
chore(e2e, web, preferences): clean-up unnecessary env checks and build step injections; consolidate shared env / feature setting in e2e for both runtimes; clean-up ai tests and re-enable for web #7491
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(e2e, web, preferences): clean-up unnecessary env checks and build step injections; consolidate shared env / feature setting in e2e for both runtimes; clean-up ai tests and re-enable for web #7491
Conversation
…y env guard; remove unnecessary env overrides from build config; remove unnecessary preference overrides from sandbox
… ai opt-in endpoint
| // Instead we're going to update it every time the fetch call | ||
| // happens | ||
| String(url).replace( | ||
| initialBaseUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just use a static string as the initial base URL? I'd be inclined to do that so that this actually fails loudly if for some reason we still end up reaching out to the original endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not a bad idea! I was considering this, but wasn't totally sure. Will update 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 555c565
…real one to make sure its either correctly replaced or tries to hit a non existent endpoint
…re-mock-server-e2e-re-enable-tests
…reference setting
|
macOS is giving me some troubles and I'm not sure why, expanding the debugging to try to get some visibility on that |
|
I added some validation code in this manual patch in the |
I noticed that some e2e tests started to use an unnecessary pattern of baking in certain env vars right in the build even though the expectation for those is to not be hardcoded in build and instead be read in the runtime where needed. Some specs were also skipped in certain envs (mostly in web) even though they shouldn't be. This patch does a bunch of clean-up around how certain things are handled in e2es to address the cases that seem to be the reasons why tests were skipped (I'm guessing here, at least the comments explaining the reasoning wasn't always correct) or required weird env juggling overrides.
setEnvhelper for some reason was throwing when used in desktop even though it can set the env there just finesetFeaturewas sometimes failing in web if the callback is not registered, updated to make sure that the code waits for the callback to be availablesetEnv/setFeatureI'm keeping this limited to only two test suites, but there are more tests using either
skipForWebor just directly checking the globals to skip tests that are running in web even though they shouldn't. I follow-up for those, but wanted to already open a patch with these changes to the test helpers so that new tests can benefit from that.