Skip to content

Conversation

@gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jan 21, 2026

This patch changes the current e2e test flow for compass-web with atlas proxy via local sandbox to run against an actual cloud url with the compass-web assets swapped to the local version. This works as follows: we create a web extension that handles the redirect and preload it in the browser before running the tests. Atlas project that tests are running against has a feature flag for loading compass from external activated, this external entrypoint matches the regex in the extension and redirects to the localhost file server that serves the local build. This local build is as close to the real one that we will release as possible with the exception for a few internals that we have to expose for testing purposes.

This change is a bit more involved than a previous PR I opened and it kinda needs to happen at the same time, so not much I can split out here to separate PRs. I did my best to make sure that every commit is self contained and has a meaningful commit message.

We don't allow these e2e tests to run on patches, so I had to spawn them manually with a modified evergreen config file: one (is already green) and two (also green, started it after moving some code around)

You can also run these tests locally, but this requires some extra setup upfront. The process is described in .evergreen/start-atlas-cloud-cluster.sh file and you would additionally need to enable the mms.featureFlag.dataExplorerCompassWeb.loadFromCDN and disable mms.featureFlag.dataExplorerCompassWeb.restoreWorkspaces feature flags for the project you create.

@gribnoysup gribnoysup requested a review from a team as a code owner January 21, 2026 18:15
@gribnoysup gribnoysup requested a review from tculig January 21, 2026 18:15
@gribnoysup gribnoysup changed the title Compass web with atlas e2e refactor chore(e2e): refactor compass-web with atlas tests to run against real atlas instead of sandbox with proxy Jan 21, 2026
@gribnoysup gribnoysup requested a review from nbbeeken January 21, 2026 18:16
@gribnoysup gribnoysup changed the title chore(e2e): refactor compass-web with atlas tests to run against real atlas instead of sandbox with proxy chore(e2e): refactor compass-web with atlas tests to run against real atlas instead of sandbox with proxy COMPASS-10280 Jan 21, 2026
@gribnoysup gribnoysup added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Jan 21, 2026
'application/octet-stream',
});
if (req.method === 'GET') {
fs.createReadStream(requestedPath).pipe(res);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Snyk gets erroneously triggered on this line and I don't know how to tell it that the issue it suggests exists is false 😕

...browserCapabilities[context.browserName],

// from https://github.com/webdriverio-community/wdio-electron-service/blob/32457f60382cb4970c37c7f0a19f2907aaa32443/packages/wdio-electron-service/src/launcher.ts#L102
'wdio:enforceWebDriverClassic': true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I initially removed this trying to use browser.mock to replace the assets instead of redirect web extension, but this didn't work out for a couple of reasons (firefox support, weird behavior after re-launches). We don't need to disable webdriver bidi protocol for web testing though, so I'm keeping this change

@gribnoysup
Copy link
Collaborator Author

gribnoysup commented Jan 22, 2026

Started another manual patch (✅) with tests after some clean-up around sign in commands

Copy link
Collaborator

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

looks good!

return;
}

res.writeHead(401);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
res.writeHead(401);
res.writeHead(405);

not really important but unauthorized vs method not allowed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I should just start putting 418 every time I can't remember the exact code for client error :P

@gribnoysup
Copy link
Collaborator Author

This is so silly, I added a suggested fix to shut Snyk up and it's still saying that url is not sanitized, what a useful tool we have

@gribnoysup gribnoysup merged commit cd741ab into main Jan 23, 2026
55 of 57 checks passed
@gribnoysup gribnoysup deleted the compass-web-with-atlas-e2e-refactor branch January 23, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants